Page 1 of 1

[Apache, Linux, Router] Port forward issue

Posted: Fri Feb 17, 2012 9:51 am
by Isaac
The DSL modem is all set up. In fact the settings indicate to me that 2wire wanted to make the modem as easy to deal with when trying to forward a port. Even double checked the settings with users with the same router doing the same stuff with Apache.

My Apache2 server runs great localy. No issues there. I even got my cgi bin to run my little python scripts. Lots of fun stuff happening there. Lots of ajax with jquery and python stuff going on.

:?: For some reason I can't get my public ip, which my modem says is associated with my specific computer and lists the specified ports and settings, to display my webpage when I type it into my webrowser. When other people do the same steps they seem to work. Is there a middle step somewhere I've overlooked?

Re: Port forward issue

Posted: Fri Feb 17, 2012 11:29 am
by Krom
Your ISP may be blocking the use of port 80, it is a pretty common practice on residential connections.

Re: Port forward issue

Posted: Fri Feb 17, 2012 11:47 am
by Isaac
Was starting to think that but AT&T seems to be letting others do this. Other linux users on the AT&T forums have no issues.

Re: Port forward issue

Posted: Fri Feb 17, 2012 12:20 pm
by Jeff250
Even if his ISP blocks port 80 and he's using his WAN address, if he's using port forwarding, his router should be smart enough to just route back to his machine without it ever going out to the WAN.

For instance, when I do

Code: Select all

sudo hping3 -S -t 1 --traceroute -p 22 <WAN_ADDRESS>
the only intermediate hop is my router.

Does the machine you're running apache on have a firewall? For instance, can you access your Web server from other machines even on your LAN even using your server's local address?

Re: Port forward issue

Posted: Fri Feb 17, 2012 3:01 pm
by Isaac
other machines on the network can access my /www/index.html folder by putting my local ip in their browser's address bar.

I got hping3 installed and tried your command with what I thought was my WAN address, which appears to be the same as my public address, but no data was returned. I tested the command using my local gateway address to see the program in action.

Code: Select all

sudo hping3 -S -t 1 --traceroute -p 22 <WAN_ADDRESS>


I also tried to traceroute my own ip address and got nothing after 30 hops, however it works fine for other addresses.

Right now I'm starting to suspect my config files for Apache might be wrong. I'll have to go and see what others are using and compare. Maybe delete mine and start again from scratch.

Re: Port forward issue

Posted: Sat Feb 18, 2012 4:46 pm
by Jeff250
Normal traceroute uses ICMP, which tends to be unreliable due to people blocking it. hping3 -S will send a TCP packet with the SYN flag, which is the first step to creating a TCP connection.

For http, you'd want to use -p 80 though (or whatever your http port is).

I would have expected you to have at least gotten RST's though if your port 22 was unforwarded.

Are you using the right WAN address?
https://www.google.com/search?q=ip+address
And you're forwarding it to the right LAN address?

Try (temporarily) putting your server under DMZ. Try setting Apache up on a different port.

Re: Port forward issue

Posted: Wed Jan 23, 2013 9:05 am
by Isaac
Solved.

It turns out it does work. I just can't use my public ip from the router assigned to it. But to the public, the public ip works.