Wireguard as gateway vpn in opnsense

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.

  1. on the client side, enable 0.0.0.0 config:
    AllowedIPs = 0.0.0.0/0




  2. on the client side configure dns server 8.8.8.8 by configuring this tag:
    dns = 8.8.8.8


  3. 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
  4. In the firewall section you need to allow access to port 51820 for both local and remote on wan interface.



  5. Also you need to allow access from 10.252.0.0/24 on the wireguard interface and port 51820

  • wireguard, gateway, vpn
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

 Openvpn needs a gateway parameter for a route option and no default was specified

When this error is received you may need to do one of the following: enable tunnel isolation...

 Configuring a VPN Appliance for Remote Access

VPN Server Appliance Powered by OPNsense The VPN Appliance is powered by OPNsense, a...

 Shadowsocks socks proxy configuration and installation

How to install and configure Shadowsocks libev SOCKS5 proxy server on Centos and Ubunu...

 VPN Types

Planning ahead is required before choosing a VPN solution to make sure that the VPN solution...

 VPN Encryption and Security Protocols

VPN Encryption and Security Protocols Whenever you are planning and then deploying a VPN...