What's new

LAN access OpenVPN server side without NAT?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Noodle04

Occasional Visitor
Hi All.

I want to use pi-hole + OpenVPN running on GCP from my RT-AC86U. After config OpenVPN server and install OpenVPN client on my RT-AC86U, everything works. However, from pi-hole side, all request come from same IP address (OpenVPN client IP). I know this caused by OpenVPN client created a NAT tunnel, when LAN access OpenVPN server, it all from same IP.

So, I tried to disable "Create NAT on tunnel" on this OpenVPN client. Now, from LAN I can reach OpenVPN client IP address, but cannot reach OpenVPN server IP address.

From router, command `route -n` shows:
10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun11
10.8.0.0 is OpenVPN subnet, tun11 is OpenVPN interface.

I'm wondering what I missed in order to let router forward 10.8.0.0 subnet to OpenVPN server side?

Thanks for your help
 
Not sure I completely understand this config, but I *think* what you're saying is that your pihole is remotely accessible (perhaps on a VPS) via the OpenVPN client on the router, and OpenVPN server on the VPS. But because you've NAT the OpenVPN client, the pihole only sees the OpenVPN client's IP on the tunnel, rather than the LAN ip of the devices on the local network which are accessing the pihole.

Disabling NAT will work *provided* you configure the OpenVPN client/server as site-to-site. IOW, you have to tell the OpenVPN server about the local IP network used by your LAN in order for it to know to route it back over the tunnel!

 
GCP means Google Cloud Platform. And yes, you are right. This is exactly what I want: site-to-site OpenVPN.

Guess I mess up with client-config-dir. I should put command `iroute <lan subnet>` in ccd/<vpnclient>, but accidentally put `route <lan subnet>`. Now it works.

Thanks
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top