Okay I will assume proton vpn setup gave you some information. Have to guess because info not supplied.
- An IP address to use… either a single IP or perhaps a /30 address. Looks like 10.2.0.2/30
- They gave you a PRIVATE KEY, for you to use to create your Interface ( the reason they do this is normally the router will random generate both a private key and matching public key when you add an interface and then hit apply. In this case they are providing the private key because then they will already have the public key at their end to put in for your peer settings on their device.
- Public Key, this is from them to put on your router settings for your peer settings for their device.
- DNS that their device uses.. 10.2.0.1
- Endpoint port 51820 and endpoint address
- MTU ???
Now to review config…
There are three areas to focus on getting wireguard right, allowed IPs, firewall rules, IP routes.
- The allowed IPs in peer settings are not correct. First of all its clear you want to send out users for internet and thus all you need is the catch all for all traffic, a single entry!!
Should look like
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=*********
endpoint-port=51820 interface=protonwg01 public-key=\
(7) The IP address from them should work fine and should provide the correct IP Route.
You can confirm this by seeing if the router created the automatic IP route for the address in your IP ROUTES.
should look like
dst-address=10.2.0.0/0 gwy=protonwg01 table=main
(8) You do not want to modify and change the /IP DNS settings that are for the LOCAL ROUTER.
You should only change the DHCP-SERVER NETWORK settings…
Should look like:
/ip dhcp-server network
add address=10.1.0.0/16 dns-server=10.2.0.1 gateway=10.1.2.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,9.9.9.9 etc…
(9) Great rules, now because of the drop rule, all is good, everything is dropped.
Thus you need to add a rule for allowed traffic
See below:
add action=accept chain=forward comment=“allow internet” in-interface-list=
LAN out-interface-list=WAN
add action=accept chain=forward comment=“Allow Subnet into tunnel” '
src-address=10.1.0.0/16 out-interface=protonwg01
add action=drop chain=forward comment="Drop all else"
(10) I noted you are mangling traffic and its not clear why??
REMOVE all the mangling. THe only thing being mangled is a NON existent subnet 192.168.88.0/24 ???
We can move users out the wireguard interface WITHOUT mangling!!
(11) On the input chain rule you allow everyone access to the router and then you have rules allowing the same folks to port 53 tpc/udp.
Tell me if you actually think those rules will actually be matched, if they have already matched them on the allow all rule already…aka redundant.
The reason is that the first rule is supposed to limit full access to the admin only and the next two rules to everybody for needed DNS services for example.
However the first rule allows everyone.
I dont know why you made the source address list as you could already use existing structures.
src-address=10.1.0.0/16 or in-interface=bridge1
In any case, suggesting to be consistent in approach the following rule:
add chain=input action=accept in-interface-list=LAN src-address-list=AdminAccess
Where AdminAccess is a firewall address list of IPs (make static DHCP leases ) like so:
add ip-address=admin-desktop_IP list=AdminAccess (wired)
add ip-address=admin-laptop_IP list=AdminAccess (wired)
add ip-address=admin-laptop_IP list=AdminAccess (wifi)
add ip-address=admin-iphone/ipad_IP list=AdminAccess (wifi)
In any case not the main issue and you just may want to leave it for testing…
(12) I see you are trying a mangling rule for MTU manipulating. Any particular reason you elected to do this before getting everything else working right?
Is it something proton suggested? Lets leave this off for now DISABLE IT, until we get to that point for finesse IF it proves to be an issue.
(13) MISSING SOURCE NAT RULE
Remember proton gave you really one IP address and thus all the users on your local subnet will be rejected at the other end as source addresses.
Thus you need to add:
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=masquerade chain=srcnat out-interface=protonwg01
(a cool tip, you can have the same effect if you add the protonwg01 interface to the WAN interface list as a member and modify your one rule to
add action=masquerade chain=srcnat out-interface-list=WAN
(14) Your additional route to take your local subnet users and force them out the wireguard tunnel is excellent.
You also have the required table setup. What is MISSING is a ROUTING RULE;
/routing rule add src-address=10.1.0.0/16 action=lookup table=protonvpn_wg
Note: If you NEVER want your users to be able to get local internet, even if the wireguard tunnel is not working then change action to action=lookup-only-in-table
++++++++++++++++++
With mangling removed dont forget to put the fastrack rule back into the forward chain as first entry.
add action=fasttrack-connection chain=forward comment=“defconf: fasttrack” connection-state=established,related
add action=accept chain=forward comment=“defconf: accept established,related, untracked” connection-state=established,related,untracked