LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-03-2010, 03:42 PM   #1
Alanbh
LQ Newbie
 
Registered: Oct 2010
Location: Maryland
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
Linksys WRT54G NAT and DNS


I am a school net admin. I have 4 linux nat firewall boxes on 4 seperate networks all plugged into one WRT54G with the wireless function disabled. The WAN port is DHCP to my ISP modem (comcast.) WRT54G is set to gateway mode. WRT54G is not handing out IP's to clients, DHCP set to disable. Modem is a bridge and hands out dynamic internet routable ip addresses. All 4 linux boxes eth0 are static ip's and go to the WRT54g. Each Linux box is a dhcp nat firewalled router to my clients. Problem: DNS is not being resolved to my ISP from my clients. I can ping from a client to any where on the net or through my system. Tried placing the ISP DNS numbers in the /etc/resolv.conf file of servers but did not work.
Question does the WRT54G nat translate the ISP's DNS numbers also and to what? If so placing those numbers in the /etc/resolv.conf might solve the issue. Last bit of info. On one system there is 32 clients using win7 and dhcp. Some clients can surf all the time. Some never, some intermitently. IF I restart the server the above will applies to different clients. The same thing happens on the other 3 server systems. Attaching the Linux box directly to the modem and setting eh0 to DHCP I have no problems. I know it's not the linux boxes. It's placing the WRT54G between the modem and the Linux box that creates the loss of DNS resolution. Anyone with any ideas would be much appreciated.
 
Old 10-03-2010, 07:55 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Hi Alanbh, Welcome to LQ. Maybe I'm misunderstanding something, but with the modem bridged and the WRT54g not handling DHCP, is each of the Linux routers pulling an external IP from Comcast?

Good luck. ;-)
 
Old 10-04-2010, 07:51 AM   #3
Alanbh
LQ Newbie
 
Registered: Oct 2010
Location: Maryland
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Linux Routers are set to static ip. You can set a WRT54G to DHCP and it will hand out ip's in the range you set for plus you can still plug in or wirelessly assign static ip's to clients and the WRT54G will nat translate those ip's back through it's self to the WAN port which is connected to the modem. You can also turn off DHCP and use static IP's from your clients as in my case, the Linux router being the clients, and the WRT54G will back nat translate the static ip's through the WAN port to the modem. I get only one dynamic address from the modem. The WRT54G is acting as a router giving me more routable lan addresses that I am forcing it to give me by using static ip's on each client. I tried changing the /etc/resolv.conf this morning to the WRT54G ip and the system worked better but still not correctly. My next step is to do a firmware up grade. One post I read said the DNS numbers are also nat translated to the ip of the WRT54G box along with the routable external ip from the modem. It's an interesting problem!
 
Old 10-04-2010, 07:19 PM   #4
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Okay, I think I see what you've done now. Have you tried putting the IP of both the WRT54G and the ISP's DNS servers in /etc/resolv.conf?

Good luck. ;-)
 
Old 10-05-2010, 07:36 AM   #5
Alanbh
LQ Newbie
 
Registered: Oct 2010
Location: Maryland
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Tnx for Input. Haven't tried that yet. Found out the following. If I set up a temporary static ip on WRT54G WAN Port with the gateway and dns numbers set in and then set the client DNS numbers to the ip of the WRT54G box the system works perfectly. Only when I set the WAN port to DHCP the system will not resolve DNS. Spoke to COMCAST teck at length who was very network intellegent. He was as puzzled a me. When I look at the status window of the WRT54G in DHCP mode it shows a Gateway of 0.0.0.0 which is incorrect. It should show the gateway from the comcast modem. Also it does not show the real DNS numbers from the comcast modem but instead the ip of the box. Both of which the comcast tech said should not be happening. Tried a second WRT54G got the the same results. Borrowed a third WRT54G from friene last night and hooked it up to my Broadstripe modem at home. Did status window check on it and it showed the IP, Gateway, and DNS numbers all correctly. Plus it worked fine when I hooked a client to it. About ready ot try this WRT54G at school. Will post results. I have a suspision! Thankys again.
 
Old 10-05-2010, 08:01 AM   #6
Alanbh
LQ Newbie
 
Registered: Oct 2010
Location: Maryland
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Yea. Looks like one or possibly two bad WRT54G routers. The third one shows all the correct data in the status window and and can even be hooked to the client side of my Linux box nat firewall dhcp server. With client hooked to WRT54G in above config I can surf the net. Next will try flashing the firmware again of the bad WRT54G or maybe dropping back one revision and flashing.
 
Old 10-05-2010, 08:16 AM   #7
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Which versions of the WRT54G's do you have? They might be compatible with the DDWRT project.

Good luck. ;-)
 
Old 10-05-2010, 05:52 PM   #8
Alanbh
LQ Newbie
 
Registered: Oct 2010
Location: Maryland
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
I have version 8.2 and would like to try DDWRT. It might fix this modem. I will probably try DDWRT next week. Looks somewhat complicated. Could not find which file to down load from site when clicked on WRT54G ver8.2 It recommends a file but I can't find file or where to down load it on site.

Flashed Firmware in old WRT54G 4 times still no good. Got a new WRT54GL at very good price. Hooked it to Comcast box did a hard reset then looked at status window. Everything appeared. Ip, Gateway, both DNS numbers from ISP and dhcp info. All works fine. New WRT54GL solved the issue. Principal very happy. Any advice about loading DDWRT on old router would be appreciated. Wiki only gives instructions for ver 4.1. Tnx again.
 
Old 10-05-2010, 07:21 PM   #9
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Glad that worked out for you. The "L" models have a bit more flash and ram and also run a Linux based firmware (for what it's worth). The DDWRT wiki page for the 8.2 is here.

http://dd-wrt.com/wiki/index.php/Lin..._v8.0_%26_v8.2

Navigation of the different models is through the router database page.

http://www.dd-wrt.com/site/support/router-database

Good luck. ;-)
 
Old 10-06-2010, 06:26 AM   #10
Alanbh
LQ Newbie
 
Registered: Oct 2010
Location: Maryland
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
TNX again for info on DDWRT. I will try this morning. One last thing about my system which may help others reading these threads.
Comcast modem feeds WRT54GL. The WRT54GL statically feeds 4 linux nat firewall client side DHCP servers. This gives me four separate network systems so that if one network gets sick (virus or attack) the entire system does not go down plus it keeps the student from hacking the admin or teachers computers!!
When the WRT54GL or WRT54G is working properly it obtains an Ip address, Gateway address, two DNS address and DHCP address from the Comcast box, all of which are viewable from the Status window in the setup screen.
If you are connecting to the WRT54G/GL using static IP in your Linux box THEN YOU MUST SET the IP box address of the WRT54G or GL in the /etc/resolv.conf file or the system will not resolve DNS numbers. PeaceDog indicated this in a few threads back and I have confirmed it. Putting the ISP's DNS numbers in the /etc/resolve.conf will not work.
Hope these threads will help someone else also. Thanks again PeaceDog.
 
Old 10-06-2010, 10:57 AM   #11
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
You're welcome. Glad it's sorted.

Good luck. ;-)
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openswan - linksys wrt54g hadolfov Linux - Newbie 1 02-01-2008 06:21 AM
WRT54G linksys router help babyswan Linux - Networking 2 07-23-2007 07:17 AM
Setting up Linksys WRT54G router mickeyboa Fedora 2 06-11-2007 05:25 PM
linksys wrt54g firmware gv_rajasekhar Linux - Networking 1 11-27-2006 11:11 AM
WRT54G linksys router reefa Linux - Networking 2 03-16-2005 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration