Jump to content
Not connected, Your IP: 216.73.217.99
Huddling3504

How to set up to route incoming traffic on home router through vpn?

Recommended Posts

Hey.
I am wrapping my head around to set up the port forwarding properly.

I was running home server like this:

public IP -> Home router -> VRRP (keepalived) -> Kubernetes cluster

It's just worked as simple as that.
But I am trying to run it behind VPN and having hard time grasp the idea.

I gathered ideas and here is the topology that I am thinking of:
VPN --(port forwarding)--> Wireguard on home router --(iptables)--> VRRP -> Kubernetes cluster

And the commands I could make it port forwarding:
iptables -t nat -I PREROUTING -i wgc2 -p tcp --dport 26099 -j DNAT --to 192.168.0.2:443
iptables -I FORWARD -i wgc2 -p tcp -d 192.168.0.2 --dport 443 -j ACCEPT

After several times of trial and error, when I scan the vpn_ip:26099 says it is open but only that's it. No real traffic is routed (HTTP, HTTPS).

I am running Asus router with Merlin firm. What have I missed?
Thanks to bear with me.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...