How to directed through all traffic via VPN tunnel?

I have IPFire set up with a VPN using OpenVPN N2N.
How to directed through all traffic via VPN tunnel?

Hi,
‘–redirect-gateway’ should also works for N2N .

Best,

Erik

hi Erik
I have enabled redirect-gateway in both openvpn settings, but direct all traffic via vpn tunnel didn’t work.

There are no settings for N2N with this option (only for Roadwarrior), did you entered it in /var/ipfire/ovpn/{connectionname}n2n/{conectionname}n2n.conf manually ? You will need to restart the connection after changing the configuration .

Best,

Erik

hi Erik

I did update in n2n.conf according to your suggestion, but it only worked with specified subnet.
Is it possible to change line in conf file like route 0.0.0.0 0.0.0.0, therefore all traffic will be redirected to VPN tunnel, tks.

Good morning,
did you tried it with the ‘def1’ flag ? This should override the default gateway by using 0.0.0.0/1 and 128.0.0.0/1 which have the benefit of overriding but not wiping out the original default gateway.

Best,

Erik