Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've set up a Debian7 VM for PHP development, according to this guide: https://jtreminio.com/2012/07/setting-up-a-debian-vm-step-by-step/

It worked great, initially. But after restarting my Windows 7 host, I can't SSH in to the server anymore, or access files via SAMBA.

The VM has 2 Network Adapters. The first one NAT, which was its default setting. And the second one Host-Only.

The idea being that I can do stuff like http://mysite.dev/ but also SSH in to the VM, set up network drives on windows via SAMBA and still use apt-get update.

Right now, I can still run apt-get update, but any attempt to SSH in to the VM, open a network drive or view a website I made on it just fails.

My interfaces file has the following code:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.56.101
netmask 255.255.255.0

My windows hosts file contains a line for the VM and all the websites, and it worked before I restarted the windows host.

Running sudo ifup -v eth1 command gives the following error:

RTNETLINK answer: File exists

Meaning the gateway route is already listed in the ip table.

This seems very odd, as I don't even list a gateway in the settings... So why is this happening?

And before anyone pulls out their hairs trying to fix this like I did I want to ask: is it possible to run this setup with only 1 interface?

I don't really know a lot about networking. Do you really need 2 interfaces to do all this? 1 for standard internet connectivity and another one that's host-only?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.