LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-13-2016, 05:21 AM   #1
drpaudel
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.
Quote:
iface eth0 inet static
address 192.168.10.100
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
Quote:
auto eth1
iface eth2 inet static
address 192.168.4.100
netmask 255.255.255.0
network 192.168.4.0
gateway 192.168.4.1
dns-nameserver 192.168.4.1
dns-search local
What could be the possible solution and ethernet script.
 
Old 02-13-2016, 01:59 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
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 192.168.4.1 - 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
 
  


Reply

Tags
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 01:31 PM
multiple public ip one server frieza Linux - Networking 3 03-05-2010 04: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 07:40 AM
To find the public IP (on Ubuntu Server 8.10) Kratosaurion7 Linux - Networking 4 12-27-2008 04:57 PM
Multiple public ip address problem ??? cutflash Linux - Networking 1 04-08-2008 04:52 PM


All times are GMT -5. The time now is 02:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration