EDIT: Apparently it was some rules on the box running PPTP, cleared iptables on it and all works. Everything is fixed and good now. Thanks for looking
I've been trying to forward PPTP (ports 1723 and 47) to an internal machine recently, and for some reason it is no longer working. nmap reports the forwarded ports as being filtered.... I'm not sure why, but could someone check to see if there are any mistakes in my iptables setup?
Code:
# Local NAT
/sbin/iptables -P INPUT ACCEPT
/sbin/iptables -t nat -A POSTROUTING -o $extint -j MASQUERADE
#BLOCK chain
/sbin/iptables -N BLOCK
/sbin/iptables -A INPUT -j ACCEPT
/sbin/iptables -A BLOCK -m state --state ESTABLISHED,RELATED -j ACCEPT
# Block mySQL
/sbin/iptables -A BLOCK -i $extint -p tcp --tcp-flags SYN,RST SYN --dport 3306 -j REJECT
# Forward PPTP
/sbin/iptables -t nat -A PREROUTING -i $extint -p tcp --dport 1723 -j DNAT --to 172.19.1.6
/sbin/iptables -A FORWARD -i $extint -o $intint -p TCP -d 172.19.1.6 --dport 1723 -j ACCEPT
/sbin/iptables -A FORWARD -i $extint -o $intint -p 47 -m state --state NEW,ESTABLISHED,RELATED -j AC
CEPT
/sbin/iptables -t nat -A PREROUTING -i $extint -p 47 -j DNAT --to 172.19.1.6
Hope someone could help. Thanks.