各位先進好:
我是個linux的新手,因為對微軟作法不敢苟同,以及對開放源碼深感興趣,因此想試試linux網路的威力,之前是使用suse,但是後來對live cd好奇又換了b2d-kde版本使用,想架一個自己家裡使用的伺服器(如:DHCP SMABA NET這幾個基本伺服器),但是現在有一個問題深深困擾我,我也爬了好久的文,不知是我的功力不夠,看的都霧煞煞,跟red hat以及suse設定檔位置好像都不同,現在dhcp及samba動作都可以運作,但是net就無法作成功,但是我找不到iptables的設定檔,我是用b2d-ked裏面的網際網路工具裡->寬頻分享與防火牆->IP_MASQ(寬頻分享(net)),工具設定的,但是都不成功,已經試了好幾天了,快想放棄了,不知道各位大大能否指引我一盞明燈,在此先行感謝各位大大了.
以下是我在/etc/network/interfaces的eth0以及eth1設定檔(eth0對內網eth1對internet):
auto lo eth0 eth1
iface lo inet loopback
auto dsl-provider
iface dsl-provider inet ppp
provider dsl-provider
# please do not modify the following line
pre-up /sbin/ifconfig eth1 up # line maintained by pppoeconf
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.0
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
iptables -L如下:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST/SYN tcpmss match 1400:1536 TCPMSS clamp to PMTU
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ifconfig如下:
eth0 Link encap:Ethernet HWaddr 00:50:FC:30:3E:97
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe30:3e97/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13881 (13.5 KiB) TX bytes:378 (378.0 b)
Interrupt:11 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:50:BA:E9:64:3C
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:baff:fee9:643c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2214 errors:0 dropped:0 overruns:0 frame:0
TX packets:1912 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2445365 (2.3 MiB) TX bytes:210138 (205.2 KiB)
Interrupt:11 Base address:0xe000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:22 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1100 (1.0 KiB) TX bytes:1100 (1.0 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:203.73.174.214 P-t-P:203.73.174.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:2202 errors:0 dropped:0 overruns:0 frame:0
TX packets:1894 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2396127 (2.2 MiB) TX bytes:167672 (163.7 KiB)
iptables我找不到在哪裡還是有另外的設定方法鳥哥的net設定跟這個好像又不一樣
伺服器主機本身可以上網但是其他pc都無法上網internet