Connecting multiple internet connections on a server & LAN

Thread Starter


Joined Apr 22, 2010

I am creating a LAN with a Dev server running Ubuntu. I need to have a statis IP for dev box so that developers can use SSH to access the server remotely. Since the internet connection with static IP is expensive, I am planning to take two connections from the ISP, one with static IP for the server and the other for LAN. I plan to connect the dynamic IP internet to LAN using a switch to which the server will also be connected. THen I plan to install another netowrk card on the server to connect the static IP internet. Will this cause any problem since the server will effectively be connected to 2 networks. Also, will it be possible to use SSH remotely? Are any special settings required for this to work?



Joined Jan 16, 2008
I don't understand what you are trying to do. Why do you need multiple Internet connections?
The normal way you would do this is run a private network with private IP addresses internally for all of your computers/servers. The Internet will connect to a router on your network doing NAT/PAT (network address translation/port address translation). This can be either a stand-alone router or a Linux box with 2 network card and configured to do routing/NAT/PAT.
If your ISP supplies a static IP Address then that is all you need to do. If your ISP dynamically allocates the IP address then you can set up dynamic DNS listing so that outsider can call in. A google on Dynamic DNS should come up with plenty of dynamic dns service providers both free and paid-for.
Last edited:


Joined Nov 6, 2005
The only way to get a static public IP address is for the ISP to allocate it for you.

You will presumably be using an ADSL or Cable connection from the ISP. Most ADSL boxes have a built-in router/firewall/switch, a cable box may or may not. If not, there are many cheap add-on firewall/router boxes to use with cable gear.

Once you have a router/switch on your internet connection, just connect both machines or systems to that switch and port-forward SSH to the development box.

You can have multiple port forwards to different internal machines.

You can still connect it to a system that does not have a static IP - look at services like no-ip. These use a little program on one of the PCs or servers that connects out to a central server every so often, telling that what the system's current IP address is. You connect to your machine by using a name registered with the central server, that automatically directs you the present IP address.


Joined Jul 21, 2008
sorry to come in on the thread but I have done this stuff alot.
But I am wondering what happens if you portforward ssh port 22 or any other port for that matter but you forward the same port to more then one machine on the lan?

What would happen where would the router route the incoming ssh packets?

For example if the router forwards ssh port 22 to both and where would the packets go?

I have done port forwarding to different machine using different ports but what happens if you forward same ports to different machines?
Does the router even allow it.... if it did I don't know which one it would use.

Maybe the second one would be used as a backup if the first fails?


Joined May 11, 2009
But I am wondering what happens if you portforward ssh port 22 or any other port for that matter but you forward the same port to more then one machine on the lan?
I don't think the router will allow you to do that. You could host SSH on a non-standard port if you wanted to have multiple servers on the same IP though.

Anyway regarding the static IP thing, if you do not want to pay your ISP for a static IP you could set up a dynamic DNS for free using the dyndns service.

I did this for my Ubuntu server at home, running on a comcast connection.

It worked seamlessly last time my IP changed. Instead of having people connect to an IP address you would have them connect to an domain, for example


Joined May 10, 2010
Why are you switching a single ethernet cable back and forth between machines? On the face of it it wouldn't explain the problem, but it sure isn't helping matters. You also state "Working pc sates that the Ivp6 connection is 'Limited' while the other says 'no connection with network'", well that sounds like it's NOT working to me. Limited connectivity usually means the PC is attempting to contact a DHCP server, it never responds, and then it assigns itself an IP address in the 169.x.x.x address space, which is essentially useless.


Last edited by a moderator: