Quote:
|
Originally Posted by topdog
Code:
iptables-save > /etc/iptables-rules
Edit /etc/network/interfaces under your main interface add
Code:
pre-up /sbin/iptables-restore < /etc/iptables-rules
|
Thanks
first I type this command step by step
Code:
iptables --table nat --flush
Code:
iptables --delete-chain
Code:
iptables --table nat --delete-chain
Code:
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
Code:
iptables --append FORWARD --in-interface eth1 -j ACCEPT
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
after that I run this command
Code:
iptables-save > /etc/iptables-rules
and then I put this line
Code:
pre-up /sbin/iptables-restore < /etc/iptables-rules
in
Code:
/etc/network/interfaces
before
and after description of eth0 , but after that I can not
ssh to system and NAT does not work
Recent comments
16 hours 7 min ago
21 hours 6 min ago
22 hours 33 min ago
23 hours 26 min ago
1 day 1 hour ago
1 day 5 hours ago
1 day 6 hours ago
1 day 8 hours ago
1 day 21 hours ago
1 day 23 hours ago