Aloha! Thanks for the files! Great work!Hi all!
Here are uploaded init.d/wireguard scripts You will have to rename them.
Regards,
/etc/init.d/wg-client restart
restart() {
stop
start
}
restart() {
stop restart
start
}
#------------------------------------------------------------------------------
# Delete the WireGuard Client killswitch from iptables:
#------------------------------------------------------------------------------
tmpfirewall="$tmpwireguarddir"/"$kill_file_name"
if [ -f "$tmpfirewall" ]; then
logit "Information: Stop: Delete the WireGuard Client killswitch from iptables."
\rm -f "$tmpfirewall"
fi
#------------------------------------------------------------------------------
# Restart firewall if wireguard or killswitch rules are still present
#------------------------------------------------------------------------------
if [ -n "$(iptables -t nat -vnL POSTROUTING | grep -F "wg0")" ] || [ -n "$(iptables -t filter -vnL FORWARD | grep -E "REJECT.*all.*br0.*$WAN_IF")" ]; then
logit "Information: Stop: Restart firewall to remove iptables rules for WireGuard client."
#net-wall rule
net-wall restart
fi
if [ $1 -ne "restart" ]; then
#------------------------------------------------------------------------------
# Delete the WireGuard Client killswitch from iptables:
#------------------------------------------------------------------------------
tmpfirewall="$tmpwireguarddir"/"$kill_file_name"
if [ -f "$tmpfirewall" ]; then
logit "Information: Stop: Delete the WireGuard Client killswitch from iptables."
\rm -f "$tmpfirewall"
fi
#------------------------------------------------------------------------------
# Restart firewall if wireguard or killswitch rules are still present
#------------------------------------------------------------------------------
if [ -n "$(iptables -t nat -vnL POSTROUTING | grep -F "wg0")" ] || [ -n "$(iptables -t filter -vnL FORWARD | grep -E "REJECT.*all.*br0.*$WAN_IF")" ]; then
logit "Information: Stop: Restart firewall to remove iptables rules for WireGuard client."
#net-wall rule
net-wall restart
fi
fi
Hi Joe,Aloha! Thanks for the files! Great work!
I'm using them on Voxel's V1.0.4.42HF for the r9000. I seem to have everything running for "wireguard server" on the r9000 (client connects, bytes received both ways on the tunnel) can ping both ways to the vpn IPs, but no routing between the wg0 interface and the private networks on the router (vpn server) side. I seem to remember in another implementation binding the wg0 interface to another interface to pass VPN traffic. What did I miss on the r9000? Thanks for any guidance you may willing to share. I have entware installed and updated.
Joe
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!