Romain Canon's picture

Hey there,

I have been blocked on a problem for days now, and can't find out a configuration which convinces me...

The thing is: I'm working on a MacBook Pro in several situations: at my home with my own Wi-Fi, in open-spaces with free Wi-Fi accesses, or in the train where I have no Wi-Fi and where I generally deactivate the Wi-Fi connection to save some more battery juice.

I'm searching for a way to allow my Debian LAMP ( to automatically adapt to every situation (even if a reboot is required for the VM), and with the same ip-adress (because I'm just bored of constantly being forced to edit my IDE and other tools server settings).

Here is what I have by now:

In the DHCP Server tab, the checkbox is unchecked.

And here is what my /etc/network/interfaces file looks like:

auto lo

iface lo inet loopback

allow-hotplug eth0

allow-hotplug eth1

iface eth0 inet static



auto eth1

iface eth1 inet dhcp

When I have access to Wi-Fi, everything is working fine: I can have a web access in my browser (, and a ssh access in my terminal (root@

But when I have no access to Wi-Fi, I just can't get it working properly: I can't even ping


So here I am, asking some gurus if what I want is possible, and if yes: how? :-)

Thanks in advance for taking time to read me!

Romain C.

Jeremy Davis's picture

It looks like you have already configured 2 vNICs. So all you need to do is use the "host only" IP for your IDE access. That will mean that you'll need to use a different IP if you want to browse to the LAMP server from anywhere else; but otherwise should mean you can access with a single IP.
Romain Canon's picture

Hey, thanks a lot for taking time for my issue. :)

The thing is, when I don't have a Wi-Fi access, the interface shows me the same IP:, but when on my Mac terminal I try to ping this IP, it just times out...

Maybe my explanation is not clear enough, do you want some more details? Or maybe I just can't understand what you said, in which case I'm sorry, but can you explain a bit more what you want me to do?

Thanks again,


Romain C.

Jeremy Davis's picture

That IP address is for the "bridged" adaptor that you also have configured. So that one will only work when your laptop is connected to a network that gives you a 192.168.1.x IP address.

The "host-only" adaptor will have a different IP. You will need to check what that is and/or configure that separately. This answer (on SuperUser) should steer you in the right direction...

Romain Canon's picture

Absolutely perfect. Works like a charm.

Thanks a lot for your time!


Romain C.

Add new comment