Centos 8, OpenVPN connect as a client and IP Forwarding

Need help configuring your VPN? Just post here and you'll get that help.

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
ericlamer
OpenVpn Newbie
Posts: 2
Joined: Fri Feb 26, 2021 6:27 pm

Centos 8, OpenVPN connect as a client and IP Forwarding

Post by ericlamer » Fri Feb 26, 2021 6:35 pm

Hi,

I have a CentOS 8 server with OpenVPN configured as a client. I am connecting the VPN (with OpenVPN) and my server has access to the Internet thru the VPN. My server has only 1 interface (on my local network).

I have ip forwarding enabled and firewall disabled.

Is it possible to use this server as a gateway for other machine on my local network so they go thru the VPN? So local machine go to my OpenVPN machine and thru the VPN.

Right now if I try to put my Openvpn machine as a gateway for my workstation, the traffic goes to the machine but die there.

Thanks.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Centos 8, OpenVPN connect as a client and IP Forwarding

Post by TinCanTech » Fri Feb 26, 2021 6:40 pm

ericlamer wrote:
Fri Feb 26, 2021 6:35 pm
Is it possible to use this server as a gateway for other machine on my local network so they go thru the VPN?
Only if they connect to the VPN.

ericlamer
OpenVpn Newbie
Posts: 2
Joined: Fri Feb 26, 2021 6:27 pm

Re: Centos 8, OpenVPN connect as a client and IP Forwarding

Post by ericlamer » Fri Feb 26, 2021 6:59 pm

I have a QNAP NAS with OpenVpn on it with only 1 interface and I am able to use it as a gateway to go thru the VPN.

On my setup it should be pretty much the same thing. Client -> send packet -> Openvpn machine -> in local interface, out to the VPN.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Centos 8, OpenVPN connect as a client and IP Forwarding

Post by TinCanTech » Fri Feb 26, 2021 8:05 pm

ericlamer wrote:
Fri Feb 26, 2021 6:59 pm
On my setup it should be pretty much the same thing
Only that is not true .. as is demonstrated ..

Post Reply