Izzy_D
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:
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.
TinCanTech
If your router does not do port-forwarding then it cannot support an openvpn server.
300000
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
TinCanTech
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
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 .
TinCanTech
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
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