echo "Setting IP Masquerading and HD parameters...."
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "Setting iptables..... "
/sbin/iptables -F
/sbin/iptables -t nat -F
/sbin/iptables -P FORWARD DROP
# Block access to208.46.65.0/24
/sbin/iptables -A OUTPUT -d 208.48.65.0/24 -j DROP
/sbin/iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT
/sbin/iptables -A FORWARD -d 192.168.0.0/24 -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to-source 172.23.68.61
#NTHU
/sbin/iptables -A FORWARD -s 172.23.68.32 -j ACCEPT
/sbin/iptables -A FORWARD -d 172.23.68.32 -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -s 172.23.68.32 -j SNAT --to-source 172.23.68.61
沒有留言:
張貼留言