Seting up a web server behind 2 firewalls

I have a DSL modem that has a built in firewall, and a linksys router/firewall. I have a server on the LAN with a fixed IP of

192.168.1.100, the linksys WAN IP is 192.168.0.5 and LAN IP of 192.168.1.1. The website is set up to be on port 1234. So on my LAN I can enter "http://192.168.1.100:1234/website" and it gets to my website.

I want to be able to get to the web site from the web. I have a fixed IP of .xxx.xxx.xxx. Shouldn't I be able to get to my website by entering http://xxx.xxx.xxx.xxx:1234/website? I tried to set up port forwarding on the DSL modem for ports 1234-1234 to ip 192.168.0.5 (the linksys router), I then set up port forwarding on the linksys to be ports 1234-1234 to ip 192.168.1.100. It does not work. Any ideas?

Again here are my ip's

Server = 192.168.1.100 website is on port 1234 linksys WAN IP 192.168.0.5 linksys LAN IP 192.168.1.1 DSL modem WAN fixed IP of x.xxxx.xxxx.xxxx DSL modem LAN IP of 192.168.0.1

Reply to
rnes1961
Loading thread data ...

website,

1234-1234

forwarding

Tried this. It did not work.

This sounds like a good Idea. I will try this. Hopfully, by going thru just one layer it will work.

Thank you for your quick reply.

Reply to
rnes1961

Ok, now my suggestion is this. Get someone outside yer lan to try. From inside lan it may not work if the router/model thingy does not support looping. I'm not sure the correct term, but when someone has a server inside their network and they try to access it from inside their network using their own public ip, it sometimes will not work if the router doesn't support this redirection. if it does support it then it would work fine.

You do need to make sure the server listens on the right port not just

  1. also proper port forward in the router. if you try then with yer public ip and it will not work then probably that is because the router doesn't support this feature.
Reply to
Joe

The DSL modem provides a LAN side of 192.168.1.X/24? The Linksys provides a LAN side of 192.168.0.X/24?

The web server is on the LAN side of the DSL modem at 192.168.1.100?

You forwarded, through the DSL, port 1234 from DSL Public IP to DSL private IP 192.168.1.100?

If you enter http://PUBLIC_IP:1234 you should get the default website, then the /website are virtual sites off the default site.

You also have to properly configure the web server so that it knows what /website is.

To test, from the Linksys LAN, browse to http://192.168.1.100:1234 and see if you get the default site, then add the /website to it and see if you get the website virtual site.

I'm not sure I completely follow, but here goes:

DSL MODEM: forward Fixed IP port 1234 to 192.168.0.5 (linksys WAN) Linksys Router: forward port 1234 to 192.168.1.100 (web server)

Now, from outside your network, port 1234 should be mapped THROUGH DSL to Linksys WAN and through Linksys WAN to Linksys LAN.

I think I had it wrong above based on your first description (but I'm about burnt-out right now).

What you really need to be doing is running the Web Server on the LAN side of the DSL modem, and your private computers on the LAN side of the Linksys - this creates a first layer that is exposed to the Internet and a second layer that can't be reached by the first layer - you would only have to do the DSL forward and not the Linksys forward - the server would be in the DSL lan area not the Linksys.

Reply to
Leythos

Which is why I said to test from outside in one place and from inside using the internal IP in another place. I agree, "looping" will not work on many home routers - which is why I asked for outside and inside tests to the correct IP.

He already stated that he wanted to use port 1234. The only part I missed was telling him to make sure that the web server itself is listening on port 1234 - but I gathered that he had it working internally on port 1234 so I didn't suggest it.

Reply to
Leythos

[snip]

If you show the information correctly on your setup, and you forwarded the ports through, and the server is setup to listen on port 1234, then you should have it working just fine. You may need to reset the router and modem so that they properly see each other.

[snip]

It works through 2+ layers, you just haven't described your network properly or the server properly. I've setup 8 layers of Linksys routers just to test this, all using fixed WAN IP's and different subnets on the LAN side, and it works perfectly. There is nothing special about it, it's just routing traffic.

Don't forget to let us know if you get it working and how.

Reply to
Leythos

when i said 80 that was just a genralization, not thinking he said 80.

Reply to
Joe

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.