Broadcasting an IP behind a Firewall

Hey drop us a line about the show. Feel free to ask questions, provide feedback and criticism, or just ramble on about anything your little heart desires.

Moderators: snarkout, Patrick, dann

Post Reply
User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Broadcasting an IP behind a Firewall

Post by Jza » Thu Feb 02, 2006 12:35 am

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.
Alexandro COLORADO

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Post by snarkout » Thu Feb 02, 2006 8:56 am

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.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

Judland
Posts: 1030
Joined: Tue Apr 27, 2004 12:55 pm

Post by Judland » Thu Feb 02, 2006 10:16 am

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.

User avatar
Gomer_X
Posts: 901
Joined: Fri Jun 03, 2005 1:31 pm
Location: Cincinnati, Ohio, USA
Contact:

Post by Gomer_X » Thu Feb 02, 2006 10:17 am

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.

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Post by snarkout » Thu Feb 02, 2006 11:07 am

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.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

User avatar
dann
Site Admin
Posts: 1132
Joined: Mon Apr 26, 2004 10:55 pm
Location: Hampton, Va, USA
Contact:

Post by dann » Thu Feb 02, 2006 12:20 pm

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.

Post Reply