I have two location running ArchLinux servers.
- Remote location is NATed by local ISP's router. ISP over there doesn't provide public IP address so router has the 10.0/16 ip address and there is no way to get the public ip address from ISP.
- Home location, where again ArchLinux server is running but NATed behind ISP's router. But in this case, ISP provides a public ipv4 address.
I am running wireguard on both servers. Using the public ip address on home location and router's port forwarding capability, remote ArchLinux server can establish a wireguard peer connection to home location.
I have setup a SOCKS5 proxy using SSH command from home location to remote location. Using this SOCKS5 proxy, browsers in my home network can route the traffic to access website and services from remote location. Think it as of geo-unblocking services use case.
Now I want to take it a step further and want to make a my home ArchLinux server a linux router so other devices can forward the traffic via remote location as well.
Home server has only 1 eth port. It has a wifi card, but not connected. I can create a virtual interface for routing, not sure exactly how to do but probably can read the document and do it. My biggest question is how can I create a router from it so I can receive traffic on home server and forward to remote server over wireguard peer tunnel that is already established. I want other devices to access the remote server as well, not just browsers with SOCKS5 proxy support capabilities. I have an old router which I can use to setup a wifi. I wan this router to route traffic via home server --> wireguard tunnel --> remote server.