1

I have a computer running Debian that connects to a VPN-server. I can connect to this computer with another computer, through the VPN-server.

Now, I would like the incoming traffic (from the VPN-server, to the Debian-computer) to be routed by the Debian computer.

I've tried this (setup Debian as router), but when I try to run it, it says "Bad argument `tun0'". I want to do as they do it in the link, but instead of routing from one interface to another (eth0 -> eth1 and vice versa), I want the traffic from tun0 to be distributed through eth0.

Any suggestions on how I can achieve this?

1 Answer 1

1
  1. Enable IP Forwarding on your Debian:

    sysctl -w net.ipv4.ip_forward=1

  2. Add eth0 as default route on your Debian:

    ip route add default gw dev eth0

  3. Add Debian box as the default gateway on your VPN Server

Consider enabling destination NAT or other mechanism on Debian box if it is required.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .