# Accesing local network shares behind router

**URL:** <https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399>\
**Category:** Router\
**Created:** [June 20, 2022, 2:13pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399 "2022-06-20T14:13:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 20, 2022, 2:13pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/1 "2022-06-20T14:13:58Z")

</div>

![image](https://forum-static.gl-inet.com/original/2X/c/cfdbb8370bf000f37a92428467c2356d0a1de11d.png)

Hi everyone. I’ve got the following problem with my wireguard setup. I have a GL-SF1200 connect to my modem using PPPoE with a public address. The wireguard ip is 10.0.0.1 and internal ip is 192.168.8.1.  
The client pc is a win-11 desktop computer behind a nat router with the wg port forwarded, wg ip is 10.0.0.2 and network ip 192.168.1.10.  
I’ve tried different setting based on the forum posts but the best I have achieved is with my current connection; The server and client seem to be connected, I can ping 10.0.0.1 and 192.168.8.1 (both the server) from the client but I can’t ping the computers connected to the router for example 192.168.8.100 from the client or the client (10.0.0.2, 192.168.1.10) from the computers connected to the router. I also can’t connect to any of the shares in either network.  
My server settings are:  
config servers  
option local\_ip ‘10.0.0.1’  
option local\_port ‘51820’  
option local\_ipv6 ‘fd00:db8:0:abc::1’  
option private\_key ‘**’  
option public\_key '**’  
option access ‘ACCEPT’  
option enable ‘1’

config peers ‘wg\_peer\_8174’  
option name ‘**’  
option client\_key '**_’  
option private\_key '_\*\*’  
option client\_ip ‘10.0.0.2’

My client setting are:  
[Interface]  
PrivateKey = 2IB\*\*\*=  
ListenPort = 55916  
Address = 10.0.0.2/24

[Peer]  
PublicKey = \*\*\*  
AllowedIPs = 10.0.0.0/24, 192.168.8.0/24  
Endpoint = \*\*\*.glddns.com:51820  
PersistentKeepalive = 25

I appreciate your help.

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [June 21, 2022, 2:18am UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/2 "2022-06-21T02:18:08Z")

</div>

When you start WireGuard server on the GL-SF1200, did you Turn On “_Allow Access Local Network_”?

> **[WireGuard Server - GL.iNet Docs](https://docs.gl-inet.com/en/3/tutorials/wireguard_server/)**
>
> Documentation for GL.iNet Productions

_I do not work for and I do not have formal association with GL.iNet_

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 21, 2022, 4:41am UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/3 "2022-06-21T04:41:27Z")

</div>

Hi. Thanks for the response.  
Yes it is turned on and I have added the list subnet line to the wireguard\_server file on the server.

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [June 21, 2022, 5:43pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/4 "2022-06-21T17:43:30Z")

</div>

Can you try changing:

`AllowedIPs = 0.0.0.0/0 `

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 21, 2022, 6:11pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/5 "2022-06-21T18:11:38Z")

</div>

I’ve tried that. When I do that all internet traffic from the client computer gets routed through the server but still the problem with pinging and network share access remains unchanged.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 22, 2022, 4:27am UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/7 "2022-06-22T04:27:13Z")

</div>

Can you refer to [Building a Site-2-Site network manually using two GL.iNet routers](https://forum.gl-inet.com/t/building-a-site-2-site-network-manually-using-two-gl-inet-routers/18294)

In step 7 and 9 there is guide to add route in the server and client.

Update: The problem was caused windows firewall. Thread closed.

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 22, 2022, 9:59am UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/8 "2022-06-22T09:59:50Z")

</div>

![Screenshot 2022-06-22 125749](https://forum-static.gl-inet.com/original/2X/9/91bbd853cd31fe723b364efe1d92e76474420d4b.png)  
hi thanks for th reply. Unfortunately no change

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 22, 2022, 12:37pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/9 "2022-06-22T12:37:25Z")

</div>

On the server (SF1200) you should do as step 7.

Step 9 is for the Wireguard client router.

Sorry for confusion

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 22, 2022, 1:08pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/10 "2022-06-22T13:08:28Z")

</div>

Thanks again for your efforts. The command “ip route add 192.168.\*.0/24 dev wg0” returns an error message in command prompt as my wireguard client runs on win11; if I understand it correctly this is a command to set thte ip routting in linux, right? Also do you have a command to undo the ip routing in the server?

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 22, 2022, 1:32pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/11 "2022-06-22T13:32:46Z")

</div>

In the client machine (windows) you don’t need to do anything.

In the server side you can reboot and the command is gone.

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 22, 2022, 1:46pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/12 "2022-06-22T13:46:54Z")

</div>

So how should I setup the ip route in the client?

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 22, 2022, 2:04pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/14 "2022-06-22T14:04:10Z")

</div>

No need to do anything if you use a windows.

Only needed for routers.

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 22, 2022, 3:46pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/15 "2022-06-22T15:46:14Z")

</div>

So I rebooted and edited the wireguard\_server file to the following:  
config servers  
option local\_ip ‘10.0.0.1’  
option local\_port ‘51820’  
option local\_ipv6 ‘fd00:db8:0:abc::1’  
option private\_key redacted  
option public\_key redacted  
option access ‘ACCEPT’  
option enable ‘1’

config peers ‘wg\_peer\_8174’  
option name ‘redacted’  
option client\_key redacted  
option private\_key redacted  
option client\_ip ‘10.0.0.2, 192.168.1.0/24’

![Καταγραφή](https://forum-static.gl-inet.com/original/2X/9/9bb074172f2775eeee3ac140cf93ddb956d0b6ba.png)

The problem persists

---

<div class="post-metadata">

**Author:** ![LupusE](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/lupuse/32/6737_2.png) [@LupusE](https://forum.gl-inet.com/u/LupusE)\
**Post date:** [June 22, 2022, 3:46pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/16 "2022-06-22T15:46:46Z")

</div>

Maybe it is helpful to understand what a route is.

You’ve got a client. The client got a IP 192.168.1.10/24. 24 is the same as 255.255.255.0. This means all connected devices with a IP between 192.168.10.1 to 192.168.1.254 are able to connect directly via TCP or UDP or ICMP (simplified).  
In this network is a router, 192.168.1.1/24. The two devices can talk to each other.

There is a route at the client, that say "everything you don’t know (aka not in 192.168.0.0/24), send to 192.168.0.1. This is called a default route.  
As the routers purpose is to route, the router knows his LAN IP (192.168.0.1) and his external IP from your provider.

The GL.iNet devices are routers behind routers. This means:  
The client got a 192.168.8.0/24 address. The router is 192.168.8.1/24 in the LAN and in this case 192.168.0.x/24 in the ‘LocalWAN’ (the old LAN). So the router knows to take everything send from the LAN and send it into the LocalWAN … So you can reach from your client 192.168.8.2 over your GL.iNet 192.168.8.1 and 192.168.0.254 all devices in 192.168.0.0/24 … But not the other way around.

IMPORTANT: On the whole path, the net must be unique. Even if it is only a transfer net.

Now you’re setting up a tunnel. The tunnel works nearly the same. There are two endpoints, the Client doesn’t need to know the other net, the router needs.

(Client 192.168.8.1) - (192.168.8.1 GL.iNet 10.0.0.1) - 10.0.0.2 [not allowed to be 0, like in the picture] Desktop 192.168.1.10)  
As the Desktop (192.168.1.10) is a Desktop, I don’t think it is able to route within your right LAN.

So, how is your desired Route? IP by IP.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 22, 2022, 3:54pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/17 "2022-06-22T15:54:11Z")

</div>

Can you show output of command wg in SF1200?

---

<div class="post-metadata">

**Author:** ![xize11](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/xize11/32/5340_2.png) [@xize11](https://forum.gl-inet.com/u/xize11)\
**Post date:** [June 22, 2022, 5:21pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/18 "2022-06-22T17:21:07Z")

</div>

Hmm from what I read if I understand you correctly:

You got a modem using the PPPoE connection correct? (I assume this because its often used as a isp connection type), this modem is the SF1200?

And your router (missing name here) is behind it using the wireguard client? And the server is on the SF1200?

I think you have to prototype a little here first without the wireguard because it might make things doable.

So the router has a NAT, and the modem has a NAT, with other words your router would be aware of your computer but on the part of the modem, the modem can only see the router as a client and not see the client list like inside the router.

Then there are two options:

A)  
You have to make the router static on the modem side, then portforward the input rules for this port and forward it to this router ip.

Then on the router you also portforward but then you forward it to your pc (this ip needs also static), and then of course have the wireguard share option enabled.

If im right but I’m not sure how the ddns works your network should be reachable.

B)  
Just my speculation, but wouldn’t it be easier to use a tagged vlan and make it so that the modem handles the dhcp, firewall and maybe even wireguard so you won’t have to deal with the double nat issue?, I had a situation with three nats but I needed a way to reach the clients over one cable, vlans could be very powerfull to traverse into a network topology it might be a good idea depending on your complexity of the network.

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 22, 2022, 6:07pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/19 "2022-06-22T18:07:34Z")

</div>

![Screenshot 2022-06-22 205803](https://forum-static.gl-inet.com/original/2X/8/85dae6c8b859c25b0612f7731f52dfc59fca5d74.png)

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 22, 2022, 6:16pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/20 "2022-06-22T18:16:50Z")

</div>

Hi LupusE.  
I don’ want to have access from the client lan or to client lan just to the client computer.  
So ideally I would like a route  
(192.168.8._) - (192.168.8.1 GL.iNet 10.0.0.1) - (10.0.0.2 Desktop 192.168.1.10)  
and reverse  
192.168.1.10 Desktop 10.0.0.2- 10.0.0.1 GL.Inet 192.168.8.1- 192.168.8._

---

<div class="post-metadata">

**Author:** ![liagpap](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/l/8797f3/32.png) [@liagpap](https://forum.gl-inet.com/u/liagpap)\
**Post date:** [June 22, 2022, 6:35pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/21 "2022-06-22T18:35:05Z")

</div>

Dear xize11,  
I don’t think that’s exactly the case. At the office I have a modem that connects to the internet. The wan port of the SF1200 connects to the lan port of the modem and I use the PPoE passthrough feature of the modem and connect the SF1200 with PPoE to the internet. The modem and the SF1200 have different (both public) IPs assigned. If I understand it correctly this means that there is only one NAT (of the SF1200) in play. When I check the netwok settings of the modem (which has a ip range of 192.168.0.0/255.255.255.0) the SF1200 does not have an ip or appears on the port forwarding list section of the modem.  
The client 192.168.1.10 is at home behind a modem (192.168.1.1.) that has a public ip address and wg ports forwarded.  
I hope this makes the setup more clear.  
Unfortunately the internet provider does not allow different modes and the modem does not support wg and found the vlan setup quite complicated, thats why I decided to buy the SF1200 and use the PPPoE

---

<div class="post-metadata">

**Author:** ![LupusE](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/lupuse/32/6737_2.png) [@LupusE](https://forum.gl-inet.com/u/LupusE)\
**Post date:** [June 22, 2022, 6:49pm UTC](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399/22 "2022-06-22T18:49:25Z")

</div>

> [@liagpap](#):
>
> At the office I have a modem that connects to the internet. The wan port of the SF1200 connects to the lan port of the modem and I use the PPoE passthrough feature

Okay, uncommon, but not impossible. Make sure you don’t have to pay twice in the end.  
Normal there is a PPPoE and the GL.iNet behind. And Portforwarding does the needed magic.

Please let’s focus on one direction at first.  
… btw, why WG ports? It is only one …

I assume the VPN tunnel is up and running.  
Your client behind the SF1200 is able to ping  
 192.168.8.2 (?it’s own address)  
 192.168.8.1 (the SF1200 LAN)  
 10.0.0.1 (the SF1200 wg0)  
 10.0.0.2 (the remote endpoint)  
 192.168.1.10 (the remote desktop)

Where does it stop? If it stops in the middle, it’s not a problem right now, maybe just a firewall is blocking ICMP, here.

Edit: My setup.  
I have a wg client installed on my android 11 tablet. It is connected to a wg server at my home. Than I’ve got a Beryl with WAN at my home router and LAN at my lab-laptop.  
The Beryl is connected to the wg server. I am able with my tablet, to ping the lab-laptop from everywhere through the tunnel.

But the wg server is fully capable of routing. It would be the same, if the Beryl was the server. In my case I’ve had to use ‘boringtun’ (from cloudflare), because my server is a virtual container. I don’t know if anything if this apply to your setup.

[Next page](https://forum.gl-inet.com/t/accesing-local-network-shares-behind-router/22399.md?page=2)
