Archive > 19.7 Legacy Series

Wireguard Gateway

(1/4) > >>

iwex:
Hi guys. I want to use wireguard gateway to redirect traffic using firewall rules and aliases. How should I create a new Gateway for wireguard? Maybe I forgot to add something to firewall?
Here is my settings:
Server:
--- Code: ---[Interface]
Address = 10.8.0.1/24
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 51820
PrivateKey = XXX

[Peer]
PublicKey =XXX
AllowedIPs = 10.8.0.2/32

--- End code ---

mimugmail:
Why do you use iptables rules? Is OPN the server or the client?

iwex:
I have wireguard server on VPS, found these iptables rules in some guides. If I connect to this server from my own PC - ping to 10.8.0.1 is working, and all my traffic go through wireguard.

mimugmail:
You only need an assigned gateway if OPNsense is configured as client.
Just follow this guide:

https://docs.opnsense.org/manual/how-tos/wireguard-client.html

iwex:
I saw that guide but, but it doesn't help. That guide is a bit old because gateway IP "dynamic" is not working

Navigation

[0] Message Index

[#] Next page

Go to full version