#!/bin/bash
echo 1 >/proc/sys/net/ipv4/ip_forward
iptables –flush
iptables -t nat –flush
iptables -t nat –delete-chain
iptables -t nat –append POSTROUTING -o eth0 -j MASQUERADE
iptables –append FORWARD -i eth0 -j ACCEPT
基础 分享 安全
#!/bin/bash
echo 1 >/proc/sys/net/ipv4/ip_forward
iptables –flush
iptables -t nat –flush
iptables -t nat –delete-chain
iptables -t nat –append POSTROUTING -o eth0 -j MASQUERADE
iptables –append FORWARD -i eth0 -j ACCEPT