[Apache, Linux, Router] Port forward issue

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

[Apache, Linux, Router] Port forward issue

Post 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?
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
Krom
DBB Database Master
DBB Database Master
Posts: 16039
Joined: Sun Nov 29, 1998 3:01 am
Location: Camping the energy center. BTW, did you know you can have up to 100 characters in this location box?
Contact:

Re: Port forward issue

Post by Krom »

Your ISP may be blocking the use of port 80, it is a pretty common practice on residential connections.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: Port forward issue

Post 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.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6511
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Re: Port forward issue

Post 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?
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: Port forward issue

Post 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.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6511
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Re: Port forward issue

Post 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.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: Port forward issue

Post 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.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
Post Reply