LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-13-2003, 04:26 PM   #1
bglad
LQ Newbie
 
Registered: Jul 2003
Location: Columbus, OH
Distribution: Redhat 7.3
Posts: 4

Rep: Reputation: 0
problem with DNS


I'm trying to move away from a router/hub and use a Red Hat 7.3 box to route my packets.

I assume that I set up the DHCP server correctly, because hosts get good IP addresses and know the address of the gateway. Hosts also receive the addresses of the DNS servers provided by my DSL ISP correctly.

Strangely, hosts can ping outside IPs, but not corresponding outside names. The Linux server can get to any website fine.

/etc/sysconfig/ipchains:

# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# firewall; such entries will *not* be listed here.
:input ACCEPT
:forward ACCEPT
-P forward DENY
-A forward -i ppp0 -s 192.168.0.0/255.255.255.0 -j MASQ
:output ACCEPT
-A input -s 0/0 67:68 -d 0/0 67:68 -p udp -i eth0 -j ACCEPT
-A input -s 0/0 67:68 -d 0/0 67:68 -p udp -i eth1 -j ACCEPT
-A input -s 0/0 -d 0/0 -i lo -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 0:1023 -y -j REJECT
-A input -p tcp -s 0/0 -d 0/0 2049 -y -j REJECT
-A input -p udp -s 0/0 -d 0/0 0:1023 -j REJECT
-A input -p udp -s 0/0 -d 0/0 2049 -j REJECT
-A input -p tcp -s 0/0 -d 0/0 6000:6009 -y -j REJECT
-A input -p tcp -s 0/0 -d 0/0 7100 -y -j REJECT

Any ideas why hosts don't seem to be able to resolve names correctly?
 
Old 07-13-2003, 04:40 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Do they have DNS adresses configured?
 
Old 07-13-2003, 05:29 PM   #3
bglad
LQ Newbie
 
Registered: Jul 2003
Location: Columbus, OH
Distribution: Redhat 7.3
Posts: 4

Original Poster
Rep: Reputation: 0
What do you mean?

by ipconfig /all I can tell that they are receiving the correct DNS addresses

Thanks for your time
 
Old 07-13-2003, 05:56 PM   #4
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
do you have ip forwarding enabled? type 'echo "1" > /proc/sys/net/ipv4/ip_forward' as root. Also, ensure you have a default route pointing out from your linux box, to your remote ip (next hop) at your ISP.
 
Old 10-16-2003, 10:02 AM   #5
petitcolin
LQ Newbie
 
Registered: Oct 2003
Location: Toulouse (France, 31)
Distribution: Mandrake 9.0
Posts: 4

Rep: Reputation: 0
Question DHCP, IP masq and DNS issue

I have the same problem here : DHCP set up OK (I can ping my LAN's hosts and I can ping the external IP of my gateway.
I tried setting up forwarding servers (i.e. my ISP's DNS) for the BIND server in Webmin, thinking it would take care of the routing. It didn't.
What should my route settings look like if there were a route leading from my box to my ISP's DNS ?

"route" output :
Table de routage IP du noyau
Destination Passerelle Genmask Indic Metric Ref Use Iface
192.168.254.254 * 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.60.0 * 255.255.255.0 U 0 0 0 ADIModem
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.254.254 0.0.0.0 UG 0 0 0 ppp0

Thanks
 
Old 10-16-2003, 04:35 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Re: DHCP, IP masq and DNS issue

Quote:
Originally posted by petitcolin

What should my route settings look like if there were a route leading from my box to my ISP's DNS ?
It depends on the DNS server IP. Usually, it's just a global IP which is covered by the last (default) route entry.
 
Old 10-16-2003, 08:01 PM   #7
bglad
LQ Newbie
 
Registered: Jul 2003
Location: Columbus, OH
Distribution: Redhat 7.3
Posts: 4

Original Poster
Rep: Reputation: 0
I figured out that problem. The issue was with ipchains. I selected "medium" security when I installed Redhat. If you comment out the tcp and ip lines in your ipchains file, packet forwarding works.
 
Old 10-17-2003, 12:20 AM   #8
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
FYI, DNS is completely unrelated to routing.

DNS's main function is to convert domain/hostnames into IP Addresses, that's it. It has nothing to do with the trafficing of drugs...I mean packets.

An exception to this, some may point out, is round robin DNS. I still wouldn't call it true routing though. All it does is assign 2 or more IP addresses to the same hostname, and increments down the list of which IP it gives out.

Hope this helps.
 
Old 10-20-2003, 03:56 AM   #9
petitcolin
LQ Newbie
 
Registered: Oct 2003
Location: Toulouse (France, 31)
Distribution: Mandrake 9.0
Posts: 4

Rep: Reputation: 0
I knew that !
However, for my LAN hosts to browse the web, they need to resolve names into IPs first. I'm using DHCP and I don't know how to set it up for my hosts to get my ISP's DNS addresses. As I said above, I'm using webmin to configure all this, and I have a local DNS on my LAN. Is it necessary ? Can I just go with my ISP's ?
thanks
 
Old 10-20-2003, 06:39 AM   #10
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
dhcpd

In your DHCP server config file (maybe /etc/dhcpd.conf) you can specify whatever DNS servers you want to. using the following option and syntax:

option domain-name-servers dns1, dns2, dns, ...;

You don't *need* a local DNS server, but it can make things faster. Instead of going to your ISP to get DNS requests, it just goes local and there's the chance that if you've already been to the site, your local DNS server has it cached.. hence it's faster.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
DNS problem. Please help! auroratrading Linux - Networking 1 04-05-2005 03:14 AM
Possible DNS problem? JimBass Linux - Newbie 8 10-03-2003 11:23 PM
DNS problem with RH 8.0 datamisc Linux - Newbie 2 12-20-2002 01:37 PM
DNS problem Cubiq Linux - Networking 12 09-06-2002 04:42 AM
A DNS Problem ktamit Linux - Networking 0 04-28-2002 08:45 AM

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

All times are GMT -5. The time now is 08:22 PM.

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