1

I tried searching for how to do this but either my google-foo is not up to snuff, or it is simply not asked.

I have a 3rd party application that I need to install on a computer in a private network. They do not offer an offline installation possibilities and I don't have any control over that. The installation goes out to the internet to grab software/config.

What has been recommended is to complete the installation normally and then move the machine to the private network. I can easily do this, but there is a big gotcha: one of the components requires that the IP address stay the same after the installation.

Because my private network has its own IP addressing scheme, I cannot keep the the same IP address that I had before I transition this machine to the private network.

To mitigate this, I was wondering if there was a way I could setup the machine during installation on the internet, but have it think its IP address is the private IP. So perhaps setup some kind of local mirroring/forwarding from the private IP to the internet IP so that the installation can take place with all the apps using the private IP. Then when I move the machine to the private network, the IP address will remain the same.

If anyone has any thoughts, I would appreciate it.

Thanks!!

  • 3
    Frankly, this is "scream at the vendor" territory. – ceejayoz Sep 18 at 14:56
1

There are other scenarios where this is a useful trick and the method I have used in the past assumes a fairly standard internal network behind NAT and will work with any computer with any OS. I will assume that your network with internet access is on 192.168.1/0/24 and your private (offline) network is on 10.0.0.0/24.

Get hold of a normal internet router. Any router with a WAN ethernet port will do, for instance a simple home router with an ethernet WAN port. Find a spare IP on the connected network (e.g. 192.168.1.22) and set up a router to use this IP as its WAN IP and set the existing gateway on the connected network as the router's default gateway (e.g. 192.168.1.1).

Set up the LAN side of the router to emulate your private network. If there is no outside connectivity then you may not have a default gateway on this network, but no matter, choose an IP on the private network for the router - e.g. 10.0.0.254. DHCP may be useful here.

simple network diagram
In this illustration your emulated network is 'subnet 2'.

Connect your target computer to the LAN side of the router using your planned permanent IP and set the router as the default gateway (note: you must do this even if your real private network does not have a gateway). You should have internet connectivity on the computer via double NAT. The double NAT should not cause you a problem. You will also need to provide a DNS server - this can be your existing DNS server on the normal network or outside on the internet.

Now you should be able to set up your software using the permanent IP of the computer and then move it into place when you have finished. This router set-up may be useful again in the future for updates or further software installs.

  • Exactly what I was looking for. Thanks! – Trenin Sep 18 at 17:49
0

Add a second interface with this other IP address with a subnet mast of /32 so nothing tries to go out through that second interface.

Don't know which network manager you use but this would be one way:

/etc/network/interfaces

## The real interface / ip address
auto eth0
iface eth0 inet static
 address x.x.x.x
 netmask x.x.x.x
 gateway x.x.x.x

## The fake interface
iface eth0:1
iface eth0:1 inet static
 address x.x.x.x
 netmast 255.255.255.255
  • Interesting, but how do I get the applications to use the fake internet address? I want them to think that it the real address. – Trenin Sep 18 at 15:04
  • 1
    Who knows. You don't even say what that application is... It can't really "use" it for networking... unless you NAT it somewhere to your internal subnet. – ETL Sep 18 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.