What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Wireguard Session Manager (4th) thread

If you are attempting to access router gui it will never work using router wg address, it only listens to the lan ip.

To make the rules auto apply at boot or peer restart:
Exit wgm and amtm.
Edit/create the file wgm executes when wg11-starts:
Code:
nano /jffs/addons/wireguard/Scripts/wg11-up.sh
Paste in:
Code:
#!/bin/sh

iptables -I INPUT -i wg11 -j ACCEPT
iptables -I FORWARD -i wg11 -j ACCEPT
iptables -t nat -D POSTROUTING -s $(nvram get lan_ipaddr)/24 -o wg11 -j MASQUERADE -m comment --comment "WireGuard 'client'"
Save and exit nano editor (cntrl+x y enter).
Make the file executable:
Code:
chmod +x /jffs/addons/wireguard/Scripts/wg11-up.sh
edit/create the file wgn executes when stopping wg11:
Code:
nano /jffs/addons/wireguard/Scripts/wg11-down.sh
Paste in the content:
Code:
#!/bin/sh
iptables -D INPUT -i wg11 -j ACCEPT
iptables -D FORWARD -i wg11 -j ACCEPT

Save and exit nano.

Make it executable:
Code:
chmod +x /jffs/addons/wireguard/Scripts/wg11-down.sh

That should be it!
Thank you! It works excellent.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top