Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



iptables SNAT-DNAT

MattG
10-29-2003, 01:40 AM
Hey guys.

I having a serious issue with my network.
I will map it out first for you, so you can get a view of what is going on.

Ok, we have a cable connection coming into a linksys router acting ONLY as a switch, not a router =] from there we go into a Slackware linux Box with 2 NIC's. Connecting 2 unlike networks. a 192.168.1.0 network and a 192.168.10.0 network. The 10.0 network is subnetted into 2 networks.

Now, my problem is this:

I have the slackbox acting as a router right, but i dont want my webserver open to the public..sort of...So i put the webserver on the 10.0 network. I set the linksys router to forward all HTTP requests on port 80, to the slack box, and from there (the slack box) i have it going to the web server. Sounds right, right? wrong.

using this

iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 192.168.10.x (x being webserver IP)

This works so that the outside can view the page, and here i thought it worked great! So, we tested www.google.com..and up came our website...da hell? Tried another site, and another and another..all our web site.

Great...lol.

Any idea what command can fix this..the network is pretty solid as far as everything else goes though.

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Sony: PlayStation 3 to be 3D-capable via firmware update

iSuppli: DDR3 to account for over half of DRAM shipments by Q2 2010

Facebook named third most popular video website behind YouTube and Hulu

Patriot introduces new PS-100 SSD series

Sony working on digital store for music, movies, books

Details of Intel's 32nm Atom emerge, on track for 2011

More Tech News

  
 Software Downloads

Norton Virus Definitions 2003-07 November 20, 2009

AVG Anti-Virus Updates November 20, 2009

Norton Virus Definitions 2008-09 November 20, 2009

avast! Virus Definitions November 20, 2009

McAfee SuperDAT Update 5808

Kaspersky Anti-Virus Update November 20, 2009

Google SketchUp 7.1.6087

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.