cat /proc/sys/net/ipv4/ip_forward
enable:
echo "1" > /proc/sys/net/ipv4/ip_forward
Example iptables rules: (forward port 81 to 192.168.60.10:80)
/usr/sbin/iptables -A FORWARD -p tcp --dport 80:80 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT/usr/sbin/iptables -t nat -A PREROUTING -p tcp --dport 81:81 -j DNAT --to 192.168.60.10:80
No comments:
Post a Comment