Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-13-2016, 04:21 AM   #1
LQ Newbie
Registered: Mar 2008
Posts: 15

Rep: Reputation: 0
Post Multiple Public IP problem in Ubuntu 14.04 Server.

I want to use 2 different Public IP in same Ubuntu 14.04 Server. I am using 2 Different routers with IP forwarding.
I have 2 ethernet ports eth0 and eth1. In my scenario Only one Static ip at a time is working. How can I make both public IP working remotely? Both IP are from different ISP.
iface eth0 inet static
auto eth1
iface eth2 inet static
dns-search local
What could be the possible solution and ethernet script.
Old 02-13-2016, 12:59 PM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,856

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Depends on what you are doing. There is nothing wrong with what you have.

If you are connecting to a 192.168.10.xx address it will go out eth0.
If you are connecting to a 192.168.4.xx address OR an unknown address it will go out eth1.

You can only have ONE default gateway, and that default gateway is designated to be - so any unknown outgoing addresses will be sent to that address via eth1.

You CAN specifiy specific addresses to use a different route - but these are something you do manually/put in a script to set at boot time. You would have to look at setting static routes - for Ubuntu I believe this file is /etc/network/interfaces


multiple-interface, networking, public-ip-address

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 to transfer multiple file to multiple server using public and private key sampadray81 Linux - Newbie 5 02-27-2012 12:31 PM
multiple public ip one server frieza Linux - Networking 3 03-05-2010 03:45 PM
I cant make my ip address public (ubuntu server 9.10) and mysqld.sock is empty Jamie Kugelmann Linux - Server 11 05-26-2009 06:40 AM
To find the public IP (on Ubuntu Server 8.10) Kratosaurion7 Linux - Networking 4 12-27-2008 03:57 PM
Multiple public ip address problem ??? cutflash Linux - Networking 1 04-08-2008 03:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration