eth0 Link encap:Ethernet HWaddr 00:e0:4c:e1:9b:7a
inet addr:×。×。×。× Bcast:×。×。×。× Mask:255.255.255.248
inet6 addr: fe80::2e0:4cff:fee1:9b7a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:156439694 errors:0 dropped:0 overruns:0 frame:0
TX packets:118885883 errors:0 dropped:0 overruns:1 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1960705523 (1.8 GB) TX bytes:2168252102 (2.0 GB)
Interrupt:18 Base address:0xc000 eth1 Link encap:Ethernet HWaddr 00:0f:ea:0a:23:14
inet addr:192.168.1.1 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::20f:eaff:fe0a:2314/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:109697582 errors:0 dropped:0 overruns:0 frame:0
TX packets:120784218 errors:0 dropped:0 overruns:2 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2497399078 (2.3 GB) TX bytes:423357392 (403.7 MB)
Interrupt:20 Base address:0xc400 loLink 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:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3403 (3.3 KB) TX bytes:3403 (3.3 KB) 默认网关设置成外网就行(adsl 设置成adsl的网关) 开启路由转发: echo 1 >/proc/sys/net/ipv4/ip_forward (有的linux位置不一样) iptables 转发设置设置
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPTiptables -F
iptables -F -t nat
iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -d ! 192.168.0.0/16 -j MASQUERADE 以上是固定ip的设置的nat 设置。
http://bbs.linuxsir.org/ 如果初学呢, 用用 Redhat/Fedora/CentOS系列。如果想跟多的了解一下 学学slackware/LFS 等。 有句话 “会了slackware就懂了linux,会了redhat你只会redhat” 。 slackware很原汁原味的。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)