Hello folks,
I deployed OpenWRT on my new Xiaomi AX3200 wireless router.
I replaced the original firmware with OpenWRT 23.05.05 and I am not facing issues right now.
I decided to enable remote access to my LAN, so I installed Wireguard server.
I would permit wireguard vpn access just from my home country.
How can reach this goal?
I installed banip package, but I am failing concerning configuration.
BanIP supports use of GeoIP ipsets, but they might not be accurate and find yourself locked out.
In any case you can try it buy blocking all other countries.
Hello,
Can I set geo-ip filtering just for a specific port-forwarding policy?
I need to deploy 2 port-forwarding rules:
wireguard --> just from specific country
web server --> anyone
Some tip for me?
Should I use a different software package than "banIP"?
Alternatively, I will have to apply all public subnets assigned to ISPs in the country of interest to the port-forwarding rule.
For example, these two servicesa may be a source from which to download a list of public IP subnets:
Hello,
I will quick describe how I solved my request just using nftables firewall installed by default in OpenWRT (I understood OpenWRT is using nftables instead of iptables nowdays).
My goals are:
Let's set up two port-forwarding rules so far (Network > Firewall > Port Forwards).
Permit WireGuard connections just from remote peers located in my homecountry
Permit webserver connections from all over the world
Finally I applied this ipset inside wireguard server port-forwarding rule as shown
(Network > Firewall > Port Forwards > pickup the forwarding rule > Advanced Settings > "Use ipset" > let choose your ipset created before)
Since the WG server is running on the OpenWrt, you don't need a port forward, rather a traffic rule to allow incoming traffic to port 51820.
Other than that, any change in the IPs not updated in the file or not tracked by the service you are using will keep you out of the VPN.
Since the WG server is running on the OpenWrt, you don't need a port forward, rather a traffic rule to allow incoming traffic to port 51820.
I understood your point of view (and I agree with you).
I found different guides about WG deployment (this is an example: https://www.ivpn.net/setup/router/openwrt-wireguard/).
I understood that it is necessary create/edit zone and port-forwarding.
In any case I am open to change settings, so avoid to set-up port-forwarding concerning Wireguard VPN server
Other than that, any change in the IPs not updated in the file or not tracked by the service you are using will keep you out of the VPN.
I will create a script to automate this update process.
I will work on this project soon.