LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-08-2009, 01:17 PM   #1
SpiderMang
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
DNS Server on eth0 & eth1


I currently have a setup like this:

Quote:
Router 1 (69.11.#.#) - 192.168.0.69 (eth0)
Router 2 (71.17.#.#) - 192.168.1.71 (eth1)
I host HTTP, DNS, SMTP, IMAP, etc. All of this goes through Router 1 except DNS which I want to go through both. Both routers are setup to forward the appropriate ports to the correct LAN IP's. The problem is only 1 interface seems to work at a time. If I do ifdown eth1 then DNS works on eth0 and vise-versa. I know I have to setup /etc/network/interfaces with some routing and such but how do I do this? I have looked but I don't understand linux networking enough to do it. Here is my current configuration.

Quote:
auto eth0
iface eth0 inet static
address 192.168.0.69
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

auto eth1
iface eth1 inet static
address 192.168.1.71
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
I have tried removing gateway 192.168.1.1 but it didn't seem to help.

Also I have been thinking of trying this but I am not at home to do it right now. What do you think of trying this:

Quote:
# Loopback NIC
auto lo
iface lo inet loopback

# Primary NIC
auto eth0
iface eth0 inet static
address 192.168.0.69
netmask 255.255.255.0
post-up ip route add 192.168.0.0/24 dev eth0 src 192.168.0.69 table 1
post-up ip route add default via 192.168.0.1 table 1
post-up ip rule add from 192.168.0.69 table 1
post-down ip rule del from 192.168.0.69 table 1

# Secondary NIC
auto eth1
iface eth1 inet static
address 192.168.1.71
netmask 255.255.255.0
post-up ip route add 192.168.1.0/24 dev eth1 src 192.168.1.71 table 2
post-up ip route add default via 192.168.1.1 table 2
post-up ip rule add from 192.168.1.71 table 2
post-down ip rule del from 192.168.1.71 table 2
 
Old 10-09-2009, 06:48 AM   #2
Lordandmaker
Member
 
Registered: Sep 2005
Location: London, UK
Distribution: Debian
Posts: 258

Rep: Reputation: 39
AFAIK, you shouldn't need any funny routing, you just need to configure your DNS server to listen on both IP addresses. What DNS server are you using?
 
Old 10-10-2009, 09:57 AM   #3
SpiderMang
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
BIND9
 
  


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
how do i assign/switch eth0 & eth1 the-sloth Linux - Networking 10 02-05-2011 12:48 PM
How do I tell my server to use eth0 for the internet [DNS + gateway] in stead of eth1 elvisious Linux - Networking 1 02-14-2009 05:53 PM
Swapping eth0 & eth1? sarah_t_s Slackware 6 07-25-2004 11:14 AM
eth0 & eth1 switched superbondbond Linux - Hardware 5 12-12-2003 08:59 AM
how to set which NIC is eth0, & which is eth1 roshko Linux - Networking 4 09-01-2003 11:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:58 AM.

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