You will need to turn off nat (MASQUARADE) on GL Inet router. As this setting changes source address to be wg address for the entire lan.View attachment 60891
View attachment 60892
Hello, I only see in adguard IP of GLINET X750 and I would like to see IP of devices, in order to made differentes profiles for each one.
How can I do that?
You will need to turn off nat (MASQUARADE) on GL Inet router. As this setting changes source address to be wg address for the entire lan.
Furthermore, you will need to add on Asus router wireguard server on the peer to GL Inet router:
AllowedIPs (Server): 10.6.0.10/30, 192.168.10.0/24
I think you find this setting alittle hidden under site-2-site settings.
Can't help you with that, try Google.But I don´t know how to : to turn off nat (MASQUARADE) on GL Inet router
I get that, and right now you only see 10.6.0.10 for every lan device. This is how MASQUARADE works, same as your entire lan uses a single public ip. But this is not an asus router issue, it's a GL Inet router issue.What I want is see IP devices ( for example 192.168.10.101) in ADH to apply rules and specific filters
This should already be taken care of when changing AllowedIPs (Server), a route in the main route table should been added for 192.168.10.0/24 to wgs1 (and wg will route to correct peer).Of course, all this assumes you also have static routing configured properly on the WG server side (the use of NAT w/ the WG client is intended to make that unnecessary).
I may be out on thin ice here, but this source:But I don´t know how to : to turn off nat (MASQUARADE) on GL Inet router
Looks like you don't have masquerading enabled for neither wan or Wireguard which may give issues if you have lan clients using wan.This is my configuration.
Not. When I see connections on ADGUARD HOME I just see IP of WG not real IP of devices in other LAN (192.168.10.x)Looks like you don't have masquerading enabled for neither wan or Wireguard which may give issues if you have lan clients using wan.
But did this resolve your issue or not?
Then the Gl.Inet router is still masquerading... unless wireguard dns is setup to use router itself as forwarder for dns (dnsmasq).Not. When I see connections on ADGUARD HOME I just see IP of WG not real IP of devices in other LAN (192.168.10.x)
iptables -nvL POSTROUTING -t nat
root@GL-X750:~# iptables -nvL POSTROUTING -t nat
# Warning: iptables-legacy tables present, use iptables-legacy to see them
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
root@GL-X750:~#
Aha, gl.inet router are using nftables... im not as familiar with those. You should be able to list them byI will check config wireguard but in SSH of gl.inet I have this:
Code:root@GL-X750:~# iptables -nvL POSTROUTING -t nat # Warning: iptables-legacy tables present, use iptables-legacy to see them Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination root@GL-X750:~#
nft list ruleset
chain dstnat {
type nat hook prerouting priority dstnat; policy accept;
}
chain srcnat {
type nat hook postrouting priority srcnat; policy accept;
oifname { "eth0", "wwan0" } jump srcnat_wan comment "!fw4: Handle wan IPv4/IPv6 srcnat traffic"
}
chain srcnat_wan {
meta nfproto ipv4 masquerade comment "!fw4: Masquerade IPv4 wan traffic"
}
chain mangle_postrouting {
type filter hook postrouting priority mangle; policy accept;
}
Great! Om not an expert in these but I don't see anything pointing to masquarade being used on wireguard anymore.Code:chain dstnat { type nat hook prerouting priority dstnat; policy accept; } chain srcnat { type nat hook postrouting priority srcnat; policy accept; oifname { "eth0", "wwan0" } jump srcnat_wan comment "!fw4: Handle wan IPv4/IPv6 srcnat traffic" } chain srcnat_wan { meta nfproto ipv4 masquerade comment "!fw4: Masquerade IPv4 wan traffic" }
Code:chain mangle_postrouting { type filter hook postrouting priority mangle; policy accept; }
Great you managed to sort this out, and thanks for the link!yes it works for me.
VPN wireguard and Adguard Home
I modified it that should be: iptables -w -t nat -I PREROUTING -i br-lan -p udp --dport 53 -j DNAT --to 10.6.0.1 NOW IT WORKS!!!!!!! I can see in ADH devices connected to GL-X750forum.gl-inet.com
iptables -w -t nat -I PREROUTING -i br-lan -p udp --dport 53 -j DNAT --to 10.6.0.1
iptables -w -t nat -I PREROUTING -i br-lan -p tcp --dport 53 -j DNAT --to 10.6.0.1
Thanks. I add the line.Great you managed to sort this out, and thanks for the link!
Just a couple of notes:
- According to this post: https://forum.gl-inet.com/t/vpn-wireguard-and-adguard-home/45861/16 You added a static route in the asus router. This should not be needed as you added remote lan in AllowedIPs (server) and could be removed. I don't think it does any harm though but it does not look correctly formulated.
- The redirection rule you added:
Only covers udp dns packets, which most dns requests are, but not all. Some are tcp. For completeness you should also add:Code:iptables -w -t nat -I PREROUTING -i br-lan -p udp --dport 53 -j DNAT --to 10.6.0.1
Code:iptables -w -t nat -I PREROUTING -i br-lan -p tcp --dport 53 -j DNAT --to 10.6.0.1
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!