One Bad Pixel
All your pixel are belong to us.
«
»

Forwarding PPTP through DDWRT using iptables

I had a scenario where I needed to forward PPTP through my DDWRT box so that it could connect to the Windows server remote access. This seems like it would be trivial port mapping, but PPTP relies on GRE (protocol 47) as well. Here is what I did to make it work…


#---firewall
#Forward PPTP and GRE to server
pptpsvr=10.10.10.245
iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport 1723 -j DNAT --to $pptpsvr:1723
iptables -t nat -I PREROUTING -p gre -d $(nvram get wan_ipaddr) -j DNAT --to $pptpsvr
iptables -I FORWARD -p tcp --dport 1723 -d $pptpsvr -j logaccept
iptables -I FORWARD -p gre -d $pptpsvr -j logaccept
 

Leave a comment!