Page 1 of 1

Broadcasting an IP behind a Firewall

Posted: Thu Feb 02, 2006 12:35 am
by Jza
I have Linksys firewall and I have a machine which I want to put out on the net so I can share some files. I want to use apache for that (FTP is an overkil since is just some images).

I want to know how to know which is my IP and how can I should configure my firewall so the outside world can get on that folder (/var/www/html/).

Thanks.

Posted: Thu Feb 02, 2006 8:56 am
by snarkout
You can't put a private IP on the internet, and if you are behind a linksys router or similar, you are undoubtedly NATed. What you want to do it forward port 80 of your public IP to the box on your lan you have the files shared on - this makes the assumption that apache is running on the standard port. To determine your IP on that box is probably going about it the wrong way, but you can find it by running "ifconfig" from the command line. You'd be much better of assigning the box a static IP and then forwarding port 80 on your linksys to that static IP. To find the public IP your linksys currently has (assuming your ISP is serving you addresses dynamically) just open a browser and go to http://www.ipchicken.com - be warned though that many (most) ISPs block port 80 traffic.

Posted: Thu Feb 02, 2006 10:16 am
by Judland
I could be wrong, but if you do the ifconfig with a PC connected to a router, you'll most likely get the IP your router has assigned that PC.

You could go to http://www.whatismyip.com/ to find out what IP your router has been assigned by your ISP, then do the port 80 thing.

Posted: Thu Feb 02, 2006 10:17 am
by Gomer_X
Most firewall/router boxes will tell you what their external IP is in their configuration screens.

On mine (D-link) I just hit 192.168.0.1 in a browser, enter a password, and there it is.

Posted: Thu Feb 02, 2006 11:07 am
by snarkout
I included how to find each of your ips for a NAT situation in that post - ipchicken is exactly the same as whatismyip. It may not have been clear enough I guess. More than likely, it won't matter anyhow since 99% of isps block outbound port 80 traffic.

Posted: Thu Feb 02, 2006 12:20 pm
by dann
Snarkout wrote: More than likely, it won't matter anyhow since 99% of isps block outbound port 80 traffic.
That being the case you can usually get around this by forwarding a different port on the router through to port 80 on your webserver. A good example is port 8080 . You can do this with any port but be sure you are not using an already established port because you may cause problems sith some services. I believe if you go above the 9000 range you should be ok. But 8080 works for most poeple.

The only downside to this is if your isp/company or whatever has blocked all but a few standard ports. Some companies block traffic going out to anything but a few standard ports like 80 so trying to get to 8080 will not work.