Does OpenVPN share the internet by default?

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
hack3rcon
OpenVpn Newbie
Posts: 15
Joined: Sun Feb 28, 2021 2:44 pm

Does OpenVPN share the internet by default?

Post by hack3rcon » Sun Jul 16, 2023 7:13 pm

Hello,
I have a Linux server that has two physical NICs as below:

Code: Select all

enp0s3: Internet  (10.0.2.15 )
enp0s8: Local NIC (192.168.1.20)
I installed the OpenVPN on my server and connected a client (Windows OS) to it via the OpenVPN client. The OpenVPN created a virtual NIC both on Linux and Windows and both operating systems can ping each other. On Linux, I have Internet, but on windows I have not. When I connected Windows client to Linux via OpenVPN, then my Windows client must be able to use the Linux Internet. Am I right?


Thank you.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Does OpenVPN share the internet by default?

Post by openvpn_inc » Tue Aug 22, 2023 8:11 pm

Hi Hack,

No. Internet "sharing", more properly called gateway redirection, only happens when using the --redirect-gateway option; a client option, typically listed among the server's --push options. Please see the man page and the howto.

Regards, rob0
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

hack3rcon
OpenVpn Newbie
Posts: 15
Joined: Sun Feb 28, 2021 2:44 pm

Re: Does OpenVPN share the internet by default?

Post by hack3rcon » Sat Sep 02, 2023 1:08 pm

openvpn_inc wrote:
Tue Aug 22, 2023 8:11 pm
Hi Hack,

No. Internet "sharing", more properly called gateway redirection, only happens when using the --redirect-gateway option; a client option, typically listed among the server's --push options. Please see the man page and the howto.

Regards, rob0
Hello,
Thank you so much for your reply.
Do you mean push "redirect-gateway def1 bypass-dhcp"?

User avatar
ordex
OpenVPN Inc.
Posts: 444
Joined: Wed Dec 28, 2016 2:32 am
Location: IRC #openvpn-devel @ libera.chat

Re: Does OpenVPN share the internet by default?

Post by ordex » Wed Sep 06, 2023 10:16 pm

hack3rcon wrote:
Sat Sep 02, 2023 1:08 pm
Hello,
Thank you so much for your reply.
Do you mean push "redirect-gateway def1 bypass-dhcp"?
Yes.

Post Reply