Mombu the GNU Linux Forum

Go Back   Mombu the GNU Linux Forum > GNU_Linux > NAT routing and DNS
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 4th November 12:34
angelus
External User
 
Posts: 1
Default NAT routing and DNS



I've tried several firewall/routing scripts and I've had the same
problem with all of them. I can access the everything on the internet
from my 'server' without a problem. But all the client machines can
only access a website using an ip. The linux box is not passing dns
requests to the ISP.

Do I need to run named on my linux box? I've been under the assumption
that the iptables scripts would just forward the requests to my ISP.

How can I get my linux box to forward dns requests to my ISP?

Thanks!!
  Reply With Quote


 


2 4th November 12:34
julio acosta-cabronero
External User
 
Posts: 1
Default NAT routing and DNS



#---------------------------------------------------------------
# Allow outbound DNS queries from the FW and the replies too
#
# - Interface eth0 is the internet interface
#
# Zone transfers use TCP and not UDP. Most home networks
# / websites using a single DNS server won't require TCP statements
#
#---------------------------------------------------------------

/sbin/iptables -A OUTPUT -p udp -o eth0 --dport 53 --sport 1024:65535 -j
ACCEPT

/sbin/iptables -A INPUT -p udp -i eth0 --sport 53 --dport 1024:65535 -j
ACCEPT


*** http://www.linuxhomenetworking.com/l...bles-intro.htm
  Reply With Quote
3 4th November 12:36
angelus
External User
 
Posts: 1
Default NAT routing and DNS


Perfect!!!

Much thanks Julio!
  Reply With Quote
4 4th November 12:37
olivier
External User
 
Posts: 1
Default NAT routing and DNS


echo 1 > /proc/sys/net/ipv4/ip_forward

This should be what you need
Typically you put this at the beginning of your firewall script ( the
one which sets your iptables config )

or if your box is definetely a router you can also edit your
/etc/sysctl.conf file and add or change:

# Controls IP packet forwarding
net.ipv4.ip_forward =1
  Reply With Quote
5 4th November 12:44
angelus
External User
 
Posts: 1
Default NAT routing and DNS


I already had /proc/sys/net/ipv4/ip_forward set. I'll set sysctl.conf
as well.

Thanks!!
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666