Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-13-2003, 04:26 PM
|
#1
|
LQ Newbie
Registered: Jul 2003
Location: Columbus, OH
Distribution: Redhat 7.3
Posts: 4
Rep:
|
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?
|
|
|
07-13-2003, 04:40 PM
|
#2
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
Do they have DNS adresses configured?
|
|
|
07-13-2003, 05:29 PM
|
#3
|
LQ Newbie
Registered: Jul 2003
Location: Columbus, OH
Distribution: Redhat 7.3
Posts: 4
Original Poster
Rep:
|
What do you mean?
by ipconfig /all I can tell that they are receiving the correct DNS addresses
Thanks for your time
|
|
|
07-13-2003, 05:56 PM
|
#4
|
Member
Registered: Mar 2003
Distribution: Slackware
Posts: 234
Rep:
|
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.
|
|
|
10-16-2003, 10:02 AM
|
#5
|
LQ Newbie
Registered: Oct 2003
Location: Toulouse (France, 31)
Distribution: Mandrake 9.0
Posts: 4
Rep:
|
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
|
|
|
10-16-2003, 04:35 PM
|
#6
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
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.
|
|
|
10-16-2003, 08:01 PM
|
#7
|
LQ Newbie
Registered: Jul 2003
Location: Columbus, OH
Distribution: Redhat 7.3
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
10-17-2003, 12:20 AM
|
#8
|
Member
Registered: Mar 2003
Distribution: Slackware
Posts: 234
Rep:
|
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.
|
|
|
10-20-2003, 03:56 AM
|
#9
|
LQ Newbie
Registered: Oct 2003
Location: Toulouse (France, 31)
Distribution: Mandrake 9.0
Posts: 4
Rep:
|
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
|
|
|
10-20-2003, 06:39 AM
|
#10
|
Member
Registered: Mar 2003
Distribution: Slackware
Posts: 234
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 08:22 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|