Hello everyone, I recently switched from pfSense to VyOS 1.3.6 and I’m still getting used to the CLI but I really like how everything works, but I still have a few things to configure, including what I’m here to ask. Currently my ISP has CG-NAT, so my idea was to get a cheap VPS and make a wireguard tunnel and redirect the ports from the VPS to my local network but keeping my ISP internet as default route.
My Lan subnet is 172.20.0.0/16 and the wg tunnel is on 172.26.0.0/31, in pfSense i just make a firewall rule to allow connections from anywhere on the wg interface with the specific port and it just worked.
For example: I want to forward the port 9000 TCP to 172.20.1.5 but when on VyOS I make a firewall rule to allow port 9000 TCP on wg0 interface it does not work, I know it’s something related to routing policies but I don’t get it to work.
I can ping and ssh to and from the VPS from my local network.
The VPS has Debian and all the nat stuff is managed with bare iptables, since it worked with pfsense I don’t think the problem is in the VPS.
My goal was to allow all devices to access the VPS from my local network without having to install wireguard on each device, so that’s the reason to make the tunnel in VyOS.
I’ve been using pfsense since june 2021 and its great, I have learned a lot about routing but lately when I read about pfsense I always read bad things about netgate, although that has not been the reason, it has been mainly because my knowledge of BSD is almost null and also because the performance of wireguard I have seen that it is worse in pfsense
You need a static route on both VyOS to tell VyOS where to send the traffics. I.e. tell the vps your home network can be accessible via the vpn, and tell your home VyOS the vps is accessible via the vpn
You need a static route on both VyOS to tell VyOS where to send the traffics. I.e. tell the vps your home network can be accessible via the vpn, and tell your home VyOS the vps is accessible via the vpn
I have always read about BGP but I have never fully understood how it works but I think it may be the solution to my problem so maybe it is time to learn how to use BGP, Thank
By redirecting all the traffic from the container to the VPS, the port forwarding works, now my goal is to keep port forwarding working but using my ISP conection instead of having to redirect all the traffic to the VPS.
BGP is not a must, you can also do static route manually without bgp if you only has a few routes. I have a similar setup and I’m doing the manual static route for now. Plan to upgrade to BGP or similar protocol soon.