This short tutorial is trying to explain how to configure wireguard to work as a gateway on a opnsense vpn appliance.
If in our previous tutorial we saw how to configure the wireguard in the opnsense appliance, this tutorial extends the previous configuration by showing how to configure the wireguard to provide internet access to the clients.
- on the client side, enable 0.0.0.0 config:
AllowedIPs = 0.0.0.0/0 - on the client side configure dns server 8.8.8.8 by configuring this tag:
dns = 8.8.8.8 - on the opnsense firewall you need to add a rule into nat section > Outbound subsection so all the traffic coming from 10.252.0.0/24 network is being translated into server's main ip.
Below is a screenshot - In the firewall section you need to allow access to port 51820 for both local and remote on wan interface.
- Also you need to allow access from 10.252.0.0/24 on the wireguard interface and port 51820