WireGuard Server on Access Point

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
nolimitz
DD-WRT Guru


Joined: 26 Nov 2010
Posts: 571

PostPosted: Thu Apr 11, 2019 6:09    Post subject: WireGuard Server on Access Point Reply with quote
hello there,

so i searched through the posts and everyone seems to be running wireguard server on dd-wrt device setup as a router. my R7000P is setup as an access point (WAN disabled). i followed the wiki
Code:
https://wiki.dd-wrt.com/wiki/index.php/The_Easiest_Tunnel_Ever
and i can only access the router IP when my iPhone connects to ddwrt wireguard server.

i cannot access internet or other PCs on the LAN.

the wiki article suggests "So, head to Networking.asp and unbridge oet1 interface and enable Masquerade / NAT. " i unbridged the interface but there is no option to enable Masquerade/NAT. firewall is disabled as this is an AP.

do i need to add some routes ? any thoughts?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 5933
Location: Netherlands

PostPosted: Thu Apr 11, 2019 9:29    Post subject: Reply with quote
I have no experience with wireguard but try the following rule:
Code:
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to $(nvram get lan_ipaddr)


Administration/Commands save as firewall

Alternatively you could set a static route on your primary router to the Wireguard server and if you want internet access out set a NAT rule to NAT the wireguard traffic

_________________
Routers:Netgear R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
nolimitz
DD-WRT Guru


Joined: 26 Nov 2010
Posts: 571

PostPosted: Thu Apr 11, 2019 11:56    Post subject: Reply with quote
egc wrote:
I have no experience with wireguard but try the following rule:
Code:
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to $(nvram get lan_ipaddr)


Administration/Commands save as firewall

Alternatively you could set a static route on your primary router to the Wireguard server and if you want internet access out set a NAT rule to NAT the wireguard traffic


that worked, thanks!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum