Trying to set up a full-tunnel connection

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
Izzy_D
OpenVpn Newbie
Posts: 2
Joined: Thu Aug 05, 2021 1:57 pm

Trying to set up a full-tunnel connection

Post by Izzy_D » Thu Aug 05, 2021 2:34 pm

Hi guys!!,

I've bought a Synology NAS and installed the OpenVPN server on it. I've managed to configure it and export his configuration to my laptop (running win10). Here it is the file:

Server Config
dev tun
tls-client
remote XXXXXX.synology.me XXXX
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
remote-cert-tls client
redirect-gateway def1
pull
script-security 2
reneg-sec 0
cipher AES-256-CBC
auth SHA512
auth-user-pass
<ca>
-----BEGIN CERTIFICATE-----
...


I've put the ''redirect-gateway def1'' because I want all the data pass through my NAS Server and see my Public IP from there.
The NAS is located in my country inside a LAN with an static IP address (192.168.1.150).
I've configured the VPN server so that it assigns me a 10.8.50.X IP
Now that I'm abroad, I'm trying to use this function and the problem I've seen is that I can't use the network when I'm with this fully-tunnel setup. I tried to search info about it and it seems that I need to tell my router from home that an incoming IP 10.8.50.X IP should be redirected to my NAS 192.168.1.150 IP. That can be achieved by setting up a 'static route' in the router configuration, but sadly for me the router I have doesn't have that function of port forwarding. I still searching alternatives and I've decided to open a topic here. I've seen some prompts in the manual that maybe can be useful like ''client-nat snat|dnat network netmask alias'', but I don't know how to use them. So, I think I need advice from people more knowledgeable than I.

User avatar
TinCanTech
Forum Team
Posts: 9655
Joined: Fri Jun 03, 2016 1:17 pm

Re: Trying to set up a full-tunnel connection

Post by TinCanTech » Thu Aug 05, 2021 3:02 pm

If your router does not do port-forwarding then it cannot support an openvpn server.

300000
OpenVPN Expert
Posts: 613
Joined: Tue May 01, 2012 9:30 pm

Re: Trying to set up a full-tunnel connection

Post by 300000 » Thu Aug 05, 2021 5:15 pm

If your router cant portforward you cant connect to it .there is nothing to do with port forward at all . Now you can connect so only need is ipforward and nat at your server.

If you can ssh to your server box just try this one

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Sudo /proc/sys/net/ipv4/ip_forward =1

The first command making nat ip from virtual openvpn ip as 10.8.0.0 to real lan ip

The next is ipforward ip so traffic can go through between two ip range.

Let try it and come back here fot test out it work for you

User avatar
TinCanTech
Forum Team
Posts: 9655
Joined: Fri Jun 03, 2016 1:17 pm

Re: Trying to set up a full-tunnel connection

Post by TinCanTech » Thu Aug 05, 2021 7:37 pm

The NAS is connected inside the LAN and the router does not do port-forwarding ..

But by some hocus-pocus magic, 3ooooo thinks you can still connect ..

G00000d luck

300000
OpenVPN Expert
Posts: 613
Joined: Tue May 01, 2012 9:30 pm

Re: Trying to set up a full-tunnel connection

Post by 300000 » Thu Aug 05, 2021 7:52 pm

Your free router do have port forward but dont have static route but if you buy from market it will have static route.

You do need port forward to your NAS to make it work and you dont need static roure so why you should try to port forwarding first.

Static roure only need when you have many lan and many subnet to making it work. Fir your personal use and home you dont need static route at all .

User avatar
TinCanTech
Forum Team
Posts: 9655
Joined: Fri Jun 03, 2016 1:17 pm

Re: Trying to set up a full-tunnel connection

Post by TinCanTech » Thu Aug 05, 2021 7:58 pm

Rather than spout on about things you don't know yet,
why don't you try to establish if the router does or does not support port-forwarding.

Until then the rest of your nonsense is moot.

Izzy_D
OpenVpn Newbie
Posts: 2
Joined: Thu Aug 05, 2021 1:57 pm

Re: Trying to set up a full-tunnel connection

Post by Izzy_D » Fri Aug 06, 2021 10:18 am

I want to try if I can do the NAT-hack. My router has the option of port-forwarding things, but not the capacity of stablish a static route

Post Reply