LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-10-2012, 02:10 PM   #1
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
Setting up NAT on linux[having DNS issues]


Hello,

I am setting up NAT on linux and all is working I can ping an external ip address and skype is on, but cant resolve a domain name when on one of the network computers.The network internal info is

111.111.111.7 -node IP
255.255.255.192 -Mask
111.111.111.1 Gateway

111.111.111.1 DNS

The above info results in the PC not resolving domain names, but can pin ips.

when I change the DNS server to an external dns server it all works.

111.111.111.7 -node IP
255.255.255.192 -Mask
111.111.111.1 Gateway

178.12.32.32 -DNS

My issue is this is not how I set it up on windows servers when doing NAT(I guess maybe because on windows the dns server has root hits) The DHCP has the internal server address and gives all internal ips to the clients and they connect.How do I do this in linux so clients get the ip address scheme


111.111.111.7 -node IP
255.255.255.192 -Mask
111.111.111.1 Gateway

111.111.111.1 DNS
 
Old 01-10-2012, 06:22 PM   #2
tsumaru
LQ Newbie
 
Registered: Jan 2012
Distribution: Ubuntu
Posts: 18

Rep: Reputation: Disabled
Could you clarify what you're trying to do?
 
Old 01-10-2012, 06:26 PM   #3
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 14
Do you run a DNS on your gateway 111.111.111.1 ?
If not, any computer cannot obtain a name resulotion!

You have two basic posibilities:
1st solution
Run your own DNS software (probably 'bind') on .111.1 and set DNS to .111.1
For basic configuration of bind the following steps are enough:
1. set your ISP DNS (178.12.32.32) in /etc/resolve.conf or set by NetworkManager
2. allow your network to resolve hostnames, set /etc/named.conf : allow-query {111.111.111.1/24;};
3. allow your firewall to access port 53 from your network
4. if you use ipv6 check iptables6
5. check /etc/named.conf if DNS is listening on the correct port and IP address: listen-on port 53 { .111.1; }; listen-on-v6 port 53 { XXXX:XXXX:1; };

2nd solution
Let each computer connect ISP directly. This is very easy, if you use a DHCP in your network, just set the NS record in your DHC server settings.
 
Old 01-11-2012, 09:35 AM   #4
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Original Poster
Rep: Reputation: 42
Quote:
Originally Posted by MartinStrec View Post
Do you run a DNS on your gateway 111.111.111.1 ?
If not, any computer cannot obtain a name resulotion!

You have two basic posibilities:
1st solution
Run your own DNS software (probably 'bind') on .111.1 and set DNS to .111.1
For basic configuration of bind the following steps are enough:
1. set your ISP DNS (178.12.32.32) in /etc/resolve.conf or set by NetworkManager
2. allow your network to resolve hostnames, set /etc/named.conf : allow-query {111.111.111.1/24;};
3. allow your firewall to access port 53 from your network
4. if you use ipv6 check iptables6
5. check /etc/named.conf if DNS is listening on the correct port and IP address: listen-on port 53 { .111.1; }; listen-on-v6 port 53 { XXXX:XXXX:1; };

2nd solution
Let each computer connect ISP directly. This is very easy, if you use a DHCP in your network, just set the NS record in your DHC server settings.


Yes thanks, figured out that I needed bind to have my dns as 111.111.111.1 , thanks for your reply
 
  


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
Linux DNS/CHCP/NAT distros Seventh Linux - Newbie 2 03-05-2007 10:01 PM
setting up a linux server + firewall + nat ddaas Linux - Security 7 10-14-2004 06:42 PM
Setting up Linux NAT with Squid web cache mikeaustn Linux - Networking 5 03-02-2004 08:59 PM
DNS / Mail / NAT capable modem-router / Linux firewall stealthy1 Linux - Networking 9 04-01-2003 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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