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.

How can I route a whole net traffic from a laptop ( connected via WiFi to a router ( to which I don't have access and cannot mofidy routing table, to other host in this same network ( which will act like a router.

The whole setup looks like this:

  • Windows is a host system.
  • Linux (Debian) is a guest system and has two NICs:
    • eth0 - bridged interface -
    • eth1 - NAT interface, but later it'll be a VPN connection, but for simplicity let's say it's a typical Virtualbox NAT - so it has IP address and working gw:

Laptop has - and the default gateway set to that Linux host's bridged interface -

Now how can I route all packets from to that NAT interface inside Virtualbox VM. After setting the default gw in PC to I can see packets in wireshark in VBox guest linux, but they cannot go out of that VM. I played a bit with NAT (in fact here I have two NATs, so maybe I forgot about something), but nothing worked.

The main goal is to route everything through that Linux VM Box.

At the beginning I was trying to start with something simple, but arpspoofing didn't work. I lost internet connection on that target laptop, so I suppose there is something wrong with bridged interface and MAC's. Nevertheless right now I want to try just a routing scenario.

Any advices how should I configure iptables?

share|improve this question

migrated from serverfault.com May 30 '14 at 12:55

This question came from our site for system and network administrators.

I completely understand that I'm trying to achieve something with end-user virtualization technology, but imho question is more about iptables and routing, so imho serverfault is a better place for that. –  Simon May 30 '14 at 13:23

Your Answer


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

Browse other questions tagged or ask your own question.