1

I installed OpenVPN on an Ubuntu machine at home, but when I connect to it, all my network traffic goes through it. I don't want this to happen.

I would like to be able to see only the local LAN network, but not routing all traffic.

How could this be done?

Thanks!

  • 1
    --pull-filter ignore redirect-gateway? – Tom Yan Aug 14 '17 at 0:28
  • 1
    Also remove any redirect-gateway line in your client config. – Tom Yan Aug 14 '17 at 0:30
  • @TomYan The Client config does not have a redirect-gateway line. What should I do with the "--pull-filter ignore redirect-gateway"? Should I put it in the client config? – AnonUser456 Aug 14 '17 at 3:42
  • 1
    You can either put it in the config (without the --) or use it when you run openvpn (e.g. openvpn --config path/to/config --pull-filter ignore redirect-gateway) – Tom Yan Aug 14 '17 at 8:22
0

To condense Tom Yan's comments into an answer:

  • make sure there are no redirect-gateway lines in your client config
  • add the following line to filter out any redirect-gateway settings pulled from the VPN server:
pull-filter ignore redirect-gateway

The method is documented in https://community.openvpn.net/openvpn/wiki/IgnoreRedirectGateway, but it only mentions the --pull-filter command-line parameter, not how to add it to a config file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.