echo 1 > /proc/sys/net/ipv4/ip_forward modprobe ip_nat_pptp local_ip=xx.xx.xx.xx remote_ip=yy.yy.yy.yy iptables -P FORWARD DROP iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT # forward socks iptables -t nat -A PREROUTING -d $local_ip -p tcp --dport 10801 -j DNAT --to $remote_ip iptables -A FORWARD -d $remote_ip -p tcp --dport 10801 -j ACCEPT iptables -t nat -A POSTROUTING -d $remote_ip -p tcp --dport 10801 -j SNAT --to $local_ip # forward PPTP iptables -t nat -A PREROUTING -d $local_ip -p tcp --dport 1723 -j DNAT --to $remote_ip iptables -A FORWARD -d $remote_ip -p tcp --dport 1723 -j ACCEPT iptables -t nat -A POSTROUTING -d $remote_ip -p tcp --dport 1723 -j SNAT --to $local_ip iptables -t nat -A PREROUTING -d $local_ip -p gre -j DNAT --to $remote_ip iptables -A FORWARD -d $remote_ip -p gre -j ACCEPT iptables -t nat -A POSTROUTING -d $remote_ip -p gre -j SNAT --to $local_ip |
|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )
GMT+8, 2024-12-22 09:01 , Processed in 0.070837 second(s), 6 queries , Gzip On, Redis On.
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.