Page 1 of 1

Centos 8, OpenVPN connect as a client and IP Forwarding

Posted: Fri Feb 26, 2021 6:35 pm
by ericlamer
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.

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

Posted: Fri Feb 26, 2021 6:40 pm
by TinCanTech
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.

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

Posted: Fri Feb 26, 2021 6:59 pm
by ericlamer
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.

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

Posted: Fri Feb 26, 2021 8:05 pm
by TinCanTech
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 ..