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 (192.168.1.100) connected via WiFi to a router (192.168.1.1) to which I don't have access and cannot mofidy routing table, to other host in this same network (192.168.1.101) 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 - 192.168.1.101
    • 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 10.0.3.10 IP address and working gw: 10.0.3.2

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

Now how can I route all packets from 192.168.1.100 to that NAT interface inside Virtualbox VM. After setting the default gw in PC to 192.168.1.101 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 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 at 13:23

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.