I'm having trouble setting up static routing. My target machine has a loopback address of which I am trying to ping from another device in the network

On I can ping the loopback and the source machine.

From the source machine I have added the following static route:

route add -net netmask gw dev ens3

However I cannot ping despite being able to ping

There are no firewall rules in place blocking ICMP.

Any help appreciated.


In Linux a loopback adapter is valid only inside of its owner. You can't ping or communicate it from remote devices (You can remote access to loopback on Cisco devices)

  • Ah right didn't know that (my background is Cisco). However I created the loopback as I was having issues pinging a VM and created the loopback to see if I could prove the issue to the static routes or the VM. Again I can ping the VM from its host but not from another device on the subnet – FoxyNPF Apr 3 '17 at 11:38
  • You can use bridge port in VMware configuration of your virtual machine to enable pining of it from any other devices in your network. – SuB Apr 3 '17 at 11:43
  • I'm using VirtualBox with a Host only adapter, I'm running cuckoo sandbox which is a bit of a nightmare to configure so don't want to start messing with the network settings of the VM. I find it weird that the host can ping the guest VM bit no other device can. – FoxyNPF Apr 3 '17 at 12:33
  • 1
    using NAT adapter and adding static route to other devices may solve the problem. There is an bug in Windows version of VBox which you can't ping Guest from Host when using NAT interface. I don't know this problem exists with Linux too. – SuB Apr 4 '17 at 5:51

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.