LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-08-2002, 12:35 PM   #1
SpookMonkey
LQ Newbie
 
Registered: Apr 2002
Distribution: Mine
Posts: 10

Rep: Reputation: 0
Red face DNS problems, and IPTables ?


Hello,

I am building a Linux Firewall on a bootable CD. I've been able to get the cd to boot and to get on the Network. I can give the Machine an IP and ping to and from it.
The main purpose of this CD is to allow me to use a machine with 2 network cards, cdrom, and a floppy to act as a firewall/vpn
which will use 1 card for external access, and DHCP addresses will be given out on the second card.
My problem is that I can't seem to get dns to work. I've read several of the previous posts, and have tried the methods described with little success.
I always get the same result:
ping www.somewhere.com
ping: unknown host.

I have the following:

/etc/resolve.conf:
search mydomain.com
nameserver 207.xxx.xxx.xxx
nameserver 207.xxx.xxx.xxx

/etc/host.conf:
order bind,hosts
multi on

and I have /etc/nsswitch.conf.
I also have usual required files:
/etc/services, /etc/protocols, etc.

I am also running IpTables v1.2.6a compiled into the kernel and tried using the following settings:

iptables -A INPUT -i eth0 -p udp --dport 53 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -i eth0 -p udp -s ns1 --dport 53 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp -s ns2 --dport 53 -j ACCEPT

None of these work either.

Sys Info:
Kernel 2.4.18
Built in: IpTables v1.2.6a
Built in: FreeSwan IPSec v1.97 (for VPN)
The VPN is not implemented yet, so the problem probably most likley does not ly there.

I've installed tools like Dig,Nslookup, and netcat on the machine, and have determined that my Firewall Does allow port 53 through, and that the Nameservers Do actually work.

I've been struggling with this problem for server days already and am at a loss as to what is causing this most vexing and perplexing problem. Any help that anyone could provide would be most appreciated.

Note: There are no modules used with the kernel, it is all built in to make it easier during development. I'm not sure if all this could be caused by IpTables or not. Here are all the options I built into the kernel for IpTables:
CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_FTP=y
CONFIG_IP_NF_IRC=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=y
CONFIG_IP_NF_MATCH_MAC=y
CONFIG_IP_NF_MATCH_MARK=y
CONFIG_IP_NF_MATCH_MULTIPORT=y
CONFIG_IP_NF_MATCH_TOS=y
CONFIG_IP_NF_MATCH_AH_ESP=y
CONFIG_IP_NF_MATCH_LENGTH=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_MATCH_TCPMSS=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_NAT_IRC=y
CONFIG_IP_NF_NAT_FTP=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_TOS=y
CONFIG_IP_NF_TARGET_MARK=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
CONFIG_IP_NF_TARGET_TCPMSS=y

I only bring this up because of a recent "bug?" I have encountered while using iptables. If I use the following rules:
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
Which sets the default action to DROP, I wasn't able to ping to anywhere or use any network service. I would get the error message: "ping: Operation not permitted". I promptly removed those rules until further investigation. I don't know if there is something I am forgetting to include inside my Firewall rules.

-SpookMonkey

Last edited by SpookMonkey; 05-08-2002 at 02:20 PM.
 
Old 05-08-2002, 09:23 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I would try setting the policies to ACCEPT

then follow that by the allowed connections

then lastly deny everyone

For the dns, if dig works and the server that dig is getting the info from is your dns server then I can't see why it would not work.


Have you tried putting 127.0.0.1 as a nameserver and running named
 
  


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
Sudden DNS problems on firewall PC l0n3w012ph Linux - Networking 3 08-17-2005 04:42 AM
MandrakeSecurity Single Network Firewall Product DNS Problems jonpritcharrd Linux - Newbie 1 07-29-2002 06:18 AM
MandrakeSecurity Single Network Firewall Product DNS Problems jonpritcharrd Linux - General 1 07-10-2002 10:43 AM
MandrakeSecurity Single Network Firewall Product DNS Problems jonpritcharrd Linux - Networking 0 07-09-2002 02:59 PM
DNS problems through firewall vertices Linux - Networking 7 04-04-2002 02:07 PM

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

All times are GMT -5. The time now is 08:30 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