I have IPTABLES newly set up on my Debian Squeeze server and I have IP masquerading and port forwarding working successfully with it, however if I type into the URL bar my WAN IP or DynDNS hostname, I get a connection error. With previous consumer routers, if I had gone to http://[myhostname], it would load 10.0.0.3:80 as specified below. This works externally (tested using a 3G phone) but not internally (using any internal browser). This is the same for all forwarded ports. I'm trying to get port forwarding to work internally as well.
If anyone knows the correct incantation(s) for this, it'd be greatly appreciated. I've tried searching Google but am unsure of the correct search terms for the issue.
My configuration is as follows:
# Generated by iptables-save v1.4.8 on Thu Apr 14 15:58:27 2011
*mangle
:PREROUTING ACCEPT [1216168:676166344]
:INPUT ACCEPT [2375:260404]
:FORWARD ACCEPT [1213765:675875465]
:OUTPUT ACCEPT [1930:203384]
:POSTROUTING ACCEPT [1215695:676078849]
-A FORWARD -o ppp0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:65495 -j TCPMSS --clamp-mss-to-pmtu
COMMIT
# Completed on Thu Apr 14 15:58:27 2011
# Generated by iptables-save v1.4.8 on Thu Apr 14 15:58:27 2011
*filter
:INPUT ACCEPT [2375:260404]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [1930:203384]
-A FORWARD -i ppp0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o ppp0 -j ACCEPT
-A FORWARD -d 10.0.0.8/32 -p tcp -m tcp --dport 80 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.0.3/32 -p tcp -m tcp --dport 22 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.0.8/32 -p tcp -m tcp --dport 1723 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.0.8/32 -p udp -m udp --dport 1723 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.0.3/32 -p tcp -m tcp --dport 21 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.0.3/32 -p tcp -m tcp --dport 45631 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.0.3/32 -p tcp -m tcp --dport 56630 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.0.3/32 -p udp -m udp --dport 56630 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Thu Apr 14 15:58:27 2011
# Generated by iptables-save v1.4.8 on Thu Apr 14 15:58:27 2011
*nat
:PREROUTING ACCEPT [5529:468229]
:POSTROUTING ACCEPT [2335:258730]
:OUTPUT ACCEPT [21:1367]
-A PREROUTING -i ppp0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.0.0.8:80
-A PREROUTING -i ppp0 -p tcp -m tcp --dport 22 -j DNAT --to-destination 10.0.0.3:22
-A PREROUTING -i ppp0 -p tcp -m tcp --dport 1723 -j DNAT --to-destination 10.0.0.8:1723
-A PREROUTING -i ppp0 -p udp -m udp --dport 1723 -j DNAT --to-destination 10.0.0.8:1723
-A PREROUTING -i ppp0 -p tcp -m tcp --dport 21 -j DNAT --to-destination 10.0.0.3:21
-A PREROUTING -i ppp0 -p tcp -m tcp --dport 45631 -j DNAT --to-destination 10.0.0.3:45631
-A PREROUTING -i ppp0 -p tcp -m tcp --dport 56630 -j DNAT --to-destination 10.0.0.3:56630
-A PREROUTING -i ppp0 -p udp -m udp --dport 56630 -j DNAT --to-destination 10.0.0.3:56630
-A PREROUTING -i ppp0 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.0.0.3:22
-A POSTROUTING -o ppp0 -j MASQUERADE
COMMIT
# Completed on Thu Apr 14 15:58:27 2011