Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 





Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Networking Forum > Modems/Cable/DSL/Satellite
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Modems/Cable/DSL/Satellite Fixing your connection devices; Cisco, Intel, Zoom, Linksys

Reply
 
Thread Tools
Old 05-16-2006, 04:41 PM   #1 (permalink)
Registered User
 
Join Date: May 2006
Posts: 6
OS: XP Pro


Information and help needed about NAT

I just recently changed ISP because my previous ISP blocked ports and constantly changed IP addresses, but with this ISP, there's no restrictions (I checked with the ISP tech support) on ports, so I thought I would start a web server, but the biggest problem is, I can not use my WAN IP address or domain url to test the website (I host it locally), if I try, I get the router's admin page, so I was thinking, as I have a static IP address, and in theory I could disable NAT and use my static IP address, DNS addresses and gateway address in the TCP/IP settings of windows, then when I use either my IP address or my www domain url, I would be able to see the results of the website just as if someone outside the LAN entered the url. (in theory?, yes, in reality? maybe impossible).

I have heard of using the hosts file, but that is not a true test of my website, all that does is trick windows into using the local ip address (either 192.168.x.x or 127.0.0.1) to display the web pages, but infact I want to be able to view the website using either my WAN IP address or my www domain url, so that I would see the same as someone else outside the LAN would see, thereby using the WAN IP address or www domain url, I would be able to see if the firewall is configured properly, (using hosts files or localhost, or 192.168.x.x, doesn't show that).

The DSL modem/gateway/router is an Actiontec GT701-WG with the most recent firmware update.

Calling Actiontec tech support is not an option (they charge an arm and a leg)

The question is, how do I use either my WAN IP address or my www domain url to view my locally hosted website, without displaying the router's admin page?
usalabs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 05-16-2006, 08:01 PM   #2 (permalink)
Fox
Moderator, Microsoft Support
 
Fox's Avatar
 
Join Date: Sep 2002
Location: NJ
Posts: 7,752
OS: XP Pro, CentOS

My System

Send a message via ICQ to Fox Send a message via AIM to Fox Send a message via MSN to Fox Send a message via Yahoo to Fox Send a message via Skype™ to Fox
I would look for an option to disable remote management on your router, or at least change the port- aside from being a huge security risk to your network, it's basically blocking your server from working.

Once that's out of the way, you'll need to forward port 80 of the server to the router so that it can be accessed by your external IP.
__________________
Antec Neo Power 500W, ABIT IP35-E, Intel E2180@2.66Ghz, Corsair XMS2 2x1GB DDR2-800, PNY 8800GT, 320GB Seagate


* lazy college student alert *- If I've inadvertently ignored a thread, please Let me know about it

Have I helped you solve your problem?
Donate to Techsupportforums

Klart Skepp!
Fox is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 05-16-2006, 09:30 PM   #3 (permalink)
Registered User
 
Join Date: May 2006
Posts: 6
OS: XP Pro


The admin page (accessed via 192.168.x.x), does show the remote admin (http and telnet) is disabled, it seems the router isn't returning the wan ip address back to the local machine e.g. (random IP), http://34.67.123.45 entered into a browser from inside the network returns the routers access page, but http://localhost or http://192.168.x.x shows the webpage.

What I want to do is be able to use http://34.67.123.45 and get the webpage to show. If I disabled NAT, how would I use my wan static IP, to access my local web server by using the procedure above?, bearing in mind I have 3 other pc's connected to the network, each having their own static LAN IP, with DHCP disabled at the router.
usalabs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 05-16-2006, 10:09 PM   #4 (permalink)
Registered User
 
Join Date: May 2006
Posts: 6
OS: XP Pro


ok, I found the problem, here's the solution for anyone that has the same problem, if the router has a telnet access, login to the router using telnet, if the prompt shows something like 'Busybox' then it has an embedded linux, the following commands are used to set the NAT rules, (which can't be set using the standard web interface).

iptables -t nat -A PREROUTING --dst $INET_IP -p tcp --dport 80 -j DNAT
--to-destination $HTTP_IP

iptables -t nat -A POSTROUTING -p tcp --dst $HTTP_IP --dport 80 -j SNAT
--to-source $LAN_IP

iptables -t nat -A OUTPUT --dst $INET_IP -p tcp --dport 80 -j DNAT
--to-destination $HTTP_IP

Replace '$INET_IP' with the WAN IP, and replace '$HTTP_IP' and '$LAN_IP' with the LAN IP that is used for the web server, if a different port is used, other than 80, replace 80 with the port that's being used for the web server.

I tried it and it works perfectly, but bare in mind, that if a router reset, or the router is power cycled or the power to the router is interupted, the above commands will have to be entered manually again.

Thanks everyone.
usalabs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 05-17-2006, 07:43 AM   #5 (permalink)
Manager, Networking Forums
 
johnwill's Avatar
 
Join Date: Sep 2002
Location: S.E. Pennsylvania, US
Posts: 31,468
OS: XP-Pro, Vista, Linux


Blog Entries: 1
Many routers offer the capability of saving your settings to a file, which makes it easy to configure it again.

I'm stunned that your router doesn't remember the configuration after a power interruption, that doesn't seem right! It's also the first router I've ever heard of that doesn't have that capability.
__________________
If TSF has helped you, Tell us about it! or Donate to help keep the site up!

Microsoft MVP - Windows Desktop Experience
johnwill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 05-17-2006, 08:14 AM   #6 (permalink)
Registered User
 
Join Date: May 2006
Posts: 6
OS: XP Pro


Linksys routers do have the ability to save/backup the settings, but this is a DSL gateway/router which on neither of these tabs, Status, Quick Setup, Wirelss Setup, Utilities, or Advanced Setup, has an option to backup the settings.

I'll need to find out how to use a linux command (using telnet) to transfer the routers config file to the pc, the reverse of how a firmware upgrade is done.
usalabs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 05-17-2006, 09:39 AM   #7 (permalink)
Registered User
 
Join Date: May 2006
Posts: 6
OS: XP Pro


Quote:
Originally Posted by usalabs
iptables -t nat -A PREROUTING --dst $INET_IP -p tcp --dport 80 -j DNAT
--to-destination $HTTP_IP

iptables -t nat -A POSTROUTING -p tcp --dst $HTTP_IP --dport 80 -j SNAT
--to-source $LAN_IP

iptables -t nat -A OUTPUT --dst $INET_IP -p tcp --dport 80 -j DNAT
--to-destination $HTTP_IP (*) 'do not include this line beginning with ( it's for notation only'

Replace '$INET_IP' with the WAN IP, and replace '$HTTP_IP' and '$LAN_IP' with the LAN IP that is used for the web server, if a different port is used, other than 80, replace 80 with the port that's being used for the web server.
The above commands will also need to be added seperately if running an FTP server on the LAN, in this instance replace port 80 in the command lines, with 21.

The command line marked with (*) does not work for my router, if it works for anyone elses, that's good, if not, it'll still work with just the first 2 lines.

Last edited by usalabs : 05-17-2006 at 09:46 AM.
usalabs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 06:36 PM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82