vi /etc/sysctl.conf
內容: 把net.ipv4.ip_forward改成1..代表開啟..可以做NAT
QUOTE:
# Disables packet forwarding設定iptables:
net.ipv4.ip_forward = 1
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Disables the magic-sysrq key
#kernel.sysrq = 0
QUOTE:
iptables -A POSTROUTING -t nat -s 192.168.0.0/255.255.255.0 -j MASQUERADE這樣就行囉...
忘了還有一個設定:
(1)cd /etc/sysconf
(2)vi network
(3)將FORWARD_IPV4改成true
QUOTE:
NETWORKING=yes這樣就可以囉..
HOSTNAME=localhost.localdomain
DOMAINNAME=localdomain
FORWARD_IPV4=true