-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for configurating as a client #137
Comments
Here are a set of config instructions I used recently to get ERX working as a client, routing all traffic via my Docker based Wireguard server. I found all the steps online tend to refer to EdgeRouter as a server, not the client, so I hope this config is useful. The main issue I came across was a discrepancy in how VyoS and EdgeOS implement the routing steps. On EdgeOS defining 0.0.0.0/0 in the peers allowed-ips, and setting route-allowed-ips to true (default) causes a conflict with the default route on eth0. To get around I set route-allowed-ips to false, and used Policy Based Routing to select traffic from INSIDE and route it across the wireguard tunnel. Topology: EdgeRouterX (ERX) as a Wireguard client connecting to central Wireguard server.ERX: Wireguard Server Prerequisites
Install Wireguard on ERX
Configure a Wireguard interface (wg01)
Add the Wireguard server peer
Add a static route for the new wg01 interfaceset protocols static route 0.0.0.0/0 interface wg01 Add the firewall rule for WAN_LOCAL to allow wireguard connections (might not be needed for one-way, check you don't already have a rule 40)
Configure NAT on the tunnel, required in this example as Wireguard server only defines 10.13.13.5/32 in allowed-ips for the peer
Configure Policy Based Routing (PBR) to route all traffic for ERX 'INSIDE' across Wireguard
Please note on ERX ports 1-4 are configured on a switch, if you were doing this on an ER4+ you would need to modify that last command to apply the modify PBR onto one of the interfaces, not the switch. Commit and test the config, save when sure it's working
|
Thanks @chriscoveyduck! That helped get me working. Some of my settings were a little different, which I think comes down to differences between ERX and ERL. But it was a good guide to steer me in the right direction. Thanks! It would be great to see some official documentation for this use case. |
I succeeded with
without nat config, ER itself can communicate over wireguard but devices under ER are not. |
Package version
1.0.20220627-1
Firmware version
v2.0.9-hotfix.4
Device
EdgeRouter Lite / PoE - e100
Issue description
I am admittedly not very experienced with wireguard. So, I'm not sure if this is an issue, or something I'm doing wrong. Either way, so a better guide for getting this set up would be really helpful.
With the following configuration, I get an error commiting
Error:
This seems to be because of a static route my WAN interface is auto-creating. The only way to avoid that is to disable the interface, which leaves me with no WAN so that's a no-go.
When trying to configure with route-allowed-ips=false, I can commit the changes, but I can't figure out how to route traffic to the interface. A configure like this seems like it should work, but it does not.
Configuration and log output
No response
The text was updated successfully, but these errors were encountered: