# No access to internet from clients in Wireguard peer network (S2S)

**URL:** <https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836>\
**Category:** Networking Solutions\
**Created:** [September 14, 2023, 9:38pm UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836 "2023-09-14T21:38:16Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Eriond](https://community.teltonika.lt/user_avatar/community.teltonika.lt/eriond/32/1974_2.png) [@Eriond](https://community.teltonika.lt/u/Eriond)\
**Post date:** [September 20, 2023, 6:18am UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/22 "2023-09-20T06:18:31Z")

</div>

Just for clarity, this is the output of the `traceroute 8.8.8.8` command when executed on the site B router:

 ![image](https://community.teltonika.lt/uploads/default/original/2X/9/9135cee9615b4496655d24c75f4607e1ccd4ab08.png)

---

<div class="post-metadata">

**Author:** ![Daumantas](https://community.teltonika.lt/user_avatar/community.teltonika.lt/daumantas/32/29_2.png) [@Daumantas](https://community.teltonika.lt/u/Daumantas)\
**Post date:** [September 20, 2023, 11:03am UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/23 "2023-09-20T11:03:30Z")

</div>

Hello,

There is quite a lot of information in this thread, sorry if I got something mixed up. Went over the configuration once again, this time with an OpenWRT device:

- OpenWRT  
WireGuard **instance** configuration:  

- RUTX50  
WireGuard **instance** configuration:  

I think the issue previously was within the firewall of the OpenWRT router, as the WireGuard zone needs to be able to forward traffic to WAN as well, not only LAN. That’s why you were losing connection to the OpenWRT router.

Best regards,

---

<div class="post-metadata">

**Author:** ![Eriond](https://community.teltonika.lt/user_avatar/community.teltonika.lt/eriond/32/1974_2.png) [@Eriond](https://community.teltonika.lt/u/Eriond)\
**Post date:** [September 20, 2023, 11:12am UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/24 "2023-09-20T11:12:03Z")

</div>

I understand. The thread became a bit of a mess, because the forum wouldn’t allow me to have more than one picture per post initially. I think it’s fixed now. 🙂  
I will verify your suggestions later tonight.  
In case I can’t get it to work, I could arrange a temporary remote access to the RUTXR1 (site A) for you. I feel more like an obstacle now, than helpful. Perhaps if you had direct access, you could notice issues that slip past me due to inexperience. 😁 Please PM me in such case.

---

<div class="post-metadata">

**Author:** ![Daumantas](https://community.teltonika.lt/user_avatar/community.teltonika.lt/daumantas/32/29_2.png) [@Daumantas](https://community.teltonika.lt/u/Daumantas)\
**Post date:** [September 20, 2023, 11:17am UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/25 "2023-09-20T11:17:45Z")

</div>

I’m 95% sure it will work, but in case it does not, you’ll need to contact your reseller, or our sales manager by filling out the Contact Us form [here](https://teltonika-networks.com/about-us/contacts) to establish a private communication channel.  
Let me know how it goes!

Best regards,

---

<div class="post-metadata">

**Author:** ![Eriond](https://community.teltonika.lt/user_avatar/community.teltonika.lt/eriond/32/1974_2.png) [@Eriond](https://community.teltonika.lt/u/Eriond)\
**Post date:** [September 20, 2023, 10:11pm UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/26 "2023-09-20T22:11:26Z")

</div>

I was about to implement the changes you described about the site B firewall settings, but before I do that, I would like to understand why? Don’t get me wrong, I’m not trying to be obstruent, but I’m a bit reluctant to make the change for the following reason:

1. the B site is very far away. And it’s critical that I don’t loose contact with it, because if I can’t access the home automation system over there, I will get in a lot of trouble. So changes that could result in “cutting off the tree branch you’re sitting on” makes me very anxious. I have no means of reversing any configuration change other than getting on a train for six hours, and then bus for another hour. Not to mention the cost.
2. Site B has been working with it’s current configuration for several years. The thing that changed is at site A, where the WG tunnel is now terminating in the edge router, instead of client inside the A network. This makes me wonder about why I need to change how the WG firewall zone forwarding is done on site B?  
To my understanding, as long as the WG tunnel comes up correctly (which it does), I shouldn’t have to change anything in the config of site B. Or have I totally misunderstood what WG is? I’ve been under the impression that it is an interface like any other interface, wan for instance.

In case it was lost among the many posts I have made in this thread, let me repeat that it is outmost important that no B site client traffic may leak outside the WG tunnel. And that also goes for traffic coming via the tunnel from site A. The wan interface on the B site router may only be used for a) the encrypted WG tunnel traffic, b) DNS requests by WG to resolve the site A address, and c) NTP to set the B router’s clock. But that’s it. No device on the B (or A) lan may ever utilize the B wan directly.  
This requirement comes from a liability perspective. I am borrowing/renting internet capacity from a neighbour at site B, which is illustrated by site C in my network diagram in [post 14](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/14). The agreement for this internet access was that the neighbour should be able to claim total deniability for the traffic generated by me, transiting to his ISP.

I know, this isn’t your average bread-n-butter setup, but it was the only way for me to get some sort of broadband connectivity without paying a fortune to have a fibre cable laid out only for me. (Instead I have a km-long radiolink across a lake to my neighbour 😁)

I also found this thread from OpenWRT that kinda supports my theory of how WG works: [Understanding the 'Route Allowed IPs' option in Wireguard - Network and Wireless Configuration - OpenWrt Forum](https://forum.openwrt.org/t/understanding-the-route-allowed-ips-option-in-wireguard/152044) but then again, I have a limited understanding of how ip traffic is actually routed at a low level.

---

<div class="post-metadata">

**Author:** ![Daumantas](https://community.teltonika.lt/user_avatar/community.teltonika.lt/daumantas/32/29_2.png) [@Daumantas](https://community.teltonika.lt/u/Daumantas)\
**Post date:** [September 21, 2023, 4:58am UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/27 "2023-09-21T04:58:18Z")

</div>

Hello,

If this is the case, I’d suggest you get in contact with us via the Contact Us form, or your reseller. This way we’ll be able to organize a remote session so that I could review the changes live. Please link this thread when either filling out the form or contacting your sales manager, and I’ll get assigned to your ticket. At the moment, I cannot guarantee that the connection to the site will not be lost, thus I’d like to doublecheck everything myself before applying any changes.

As per your question, I’m not sure how the setup worked before, as from your screenshot, I can see that WireGuard can only forward traffic to LAN, from which it will not be able to exit to the internet. Adding the WAN formwarding will not break the setup, however, changing the Wireguard settings could, and this is the part I’d like to double check.

Best regards,

---

<div class="post-metadata">

**Author:** ![Eriond](https://community.teltonika.lt/user_avatar/community.teltonika.lt/eriond/32/1974_2.png) [@Eriond](https://community.teltonika.lt/u/Eriond)\
**Post date:** [September 21, 2023, 5:32am UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/28 "2023-09-21T05:32:10Z")

</div>

Thank you for still wanting to help, despite my odd setup. I realize I have a tall bill of requirements 🥺

I will apply for a direct private communication channel, as you suggest. I have also thought about the possibility to add a cron job that would revert the B site settings to a saved backup with a known working state, unless being manually disabled. That way I could set this job to execute within a couple of minutes or hours from me beginning to try different settings, and in case connection is lost, the cron job would revert those changes. But if the changes work ok, then I could just cancel the cron. Does this sound doable?

Another thing about your comment on WG and routing: From the tests I have been doing on the B site router, it seems that OpenWRT differentiates its behaviour between the router itself, and traffic being routed through it. Which would explain why I can get things like ping and traceroute to work on the router itself (by exiting directly though the wan interface), whilst the same traffic coming in through the lan interface gets redirected to the WG interface. The WG instance seems to be implemented in such a way that it implicitly uses the wan i/f for its tunnel side (`10.10.10.2`). And being a virtual device on the router itself, it doesn’t have to adhere to the firewall rules, hence bypassing them directly to wan. This behaviour would be in line with the ping and traceroute executed from the routers CLI.

Perhaps I got this totally wrong, but this is my conclusion from the behaviour I can observe. 🙂

---

<div class="post-metadata">

**Author:** ![Daumantas](https://community.teltonika.lt/user_avatar/community.teltonika.lt/daumantas/32/29_2.png) [@Daumantas](https://community.teltonika.lt/u/Daumantas)\
**Post date:** [September 21, 2023, 5:41am UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/29 "2023-09-21T05:41:33Z")

</div>

> [@Eriond](#):
>
> But if the changes work ok, then I could just cancel the cron. Does this sound doable?

Indeed, cronjob would work well here, just make sure the correct uci commands are used and changes are applied.

> [@Eriond](#):
>
> And being a virtual device on the router itself, it doesn’t have to adhere to the firewall rules, hence bypassing them directly to wan. This behaviour would be in line with the ping and traceroute executed from the routers CLI.

That’s right, the router itself is considered as `Device (input)` in the firewall rules, thus any traceroute tests should be performed from the LAN client. This is the same for both OpenWRT and RutOS.

Best regards,

---

<div class="post-metadata">

**Author:** ![system](https://community.teltonika.lt/user_avatar/community.teltonika.lt/system/32/15707_2.png) [@system](https://community.teltonika.lt/u/system)\
**Post date:** [September 29, 2023, 9:39pm UTC](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836/30 "2023-09-29T21:39:04Z")

</div>

This topic was automatically closed after 15 days. New replies are no longer allowed.

[Previous page](https://community.teltonika.lt/t/no-access-to-internet-from-clients-in-wireguard-peer-network-s2s/1836.md?page=1)
