1
I need to route all traffic coming and going from/to eth0 through openVPN before I send/receive it to/from eth1, this is a virtual machine Debian, you can call it a virtual router.
The idea is to put a dhcp on eth1, clients will connect to eth1. I want all clients to automatically be connected to the VPN.
Currently, I can route eth0 to eth1 with a DHCP in between, so clients will get their IP address and are able to browse, but as soon as I turn on openVPN, the clients can't access internet anymore.
To illustrate what I want, this might help:
How to achieve this?
Great, it works. This is my final configuration:
`*nat :PREROUTING ACCEPT [3:381] :INPUT ACCEPT [1:239] :OUTPUT ACCEPT [0:0] :POSTROUTING ACCEPT [2:142] -A POSTROUTING -o tun3 -j MASQUERADE COMMIT
*filter :INPUT ACCEPT [1:239] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -i lo -j ACCEPT -A INPUT -m conntrack --ctstate RELATED, ESTABLISHED -j ACCEPT -A FORWARD -i eth1 -j ACCEPT -A OUTPUT -o lo -j ACCEPT -A OUTPUT -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT COMMIT`
Thanks for the help! – John Smith – 2013-12-17T09:25:06.297