Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have an Ubuntu 12.04 server connected to ISP through ETH interface, and is always activated on OpenVPN (Privateinternetaccess). I would like to reach this server through ssh but can't really understand how to do this step-by-step. First, what needs to be done on the modem that the server (and rest of the network is connected to)? itself? It's a zyxel, assuming this needs to be set up with port forwarding?
Until now I have just used teamviewer to access my server when out of the house :-)
After this, then what? My servers' external IP address has now of course changed due to VPN, so how can I reach it again?
Let's look at this without the VPN component first. To SSH into your server, you're on the right track. There are 2 steps, namely:
* Configure the router for forward traffic for port 22 (SSH) to your server. I don't know the ZyXEL routers to advise on how to do this, but it's fairly straight forward on most routers. You might also find details at http://portforward.com/english/route...warding/ZyXEL/.
* To find the IP address so you can connect to it from outside even if it has changed, you can register it with a dynamic DNS service. Most routers can do the DNS updates for you automatically when the IP changes. It looks like ZyXEL can do the same - see http://help.zyxel.com/documents/webh..._WAN_DDNS.html.
If we add the VPN into the equation, the same principals apply, but some things work a little differently as you're effectively moving the end points of the connection. You didn't supply much information on the OpenVPN setup, though. Could you please elaborate on this a little? Some questions:
* Is the VPN connection established by your router or by your server?
* Where is the other end of the VPN connection - a server you manage, a public VPN service, your office, etc?
This will influence how you do the port forwarding or routing, and where/how you run a suitable DDNS service.
Hi Clifford!
Thanks a lot for your response, appreciated!
After your response, I have done the following:
-Found my external IP address, without VPN
-Registered DDNS and activated host on my server
-Port forwarding in my router to my internal IP address on my server
-After this I am now able to ssh into my server using xxxx@mynewddnsaddress.xxx; this is without VPN activated, so far so good :-)
To answer your questions:
If we add the VPN into the equation, the same principals apply, but some things work a little differently as you're effectively moving the end points of the connection. You didn't supply much information on the OpenVPN setup, though. Could you please elaborate on this a little? Some questions:
* Is the VPN connection established by your router or by your server?
This is done through my server, only
* Where is the other end of the VPN connection - a server you manage, a public VPN service, your office, etc? www.privateinternetaccess.com; iaw public VPN service
This will influence how you do the port forwarding or routing, and where/how you run a suitable DDNS service.
This is where I can't understand how this is supposed to work, how can I link my ddns to an IP nobody knows?
Thanks,
Arve
Last edited by atengesdal; 04-04-2014 at 04:51 PM.
Hi Clifford!
Thanks a lot for your response, appreciated!
After your response, I have done the following:
-Found my external IP address, without VPN
-Registered DDNS and activated host on my server
-Port forwarding in my router to my internal IP address on my server
-After this I am now able to ssh into my server using xxxx@mynewddnsaddress.xxx; this is without VPN activated, so far so good :-)
To answer your questions:
If we add the VPN into the equation, the same principals apply, but some things work a little differently as you're effectively moving the end points of the connection. You didn't supply much information on the OpenVPN setup, though. Could you please elaborate on this a little? Some questions:
* Is the VPN connection established by your router or by your server?
This is done through my server, only
* Where is the other end of the VPN connection - a server you manage, a public VPN service, your office, etc? www.privateinternetaccess.com; iaw public VPN service
This will influence how you do the port forwarding or routing, and where/how you run a suitable DDNS service.
This is where I can't understand how this is supposed to work, how can I link my ddns to an IP nobody knows?
Thanks,
Arve
Funny thing is, now it seems OK, I can reach my server through DDNS service, but when my server asks me for the password it returns back as illegal. Any idea? Is there a mismatch between my RSD* keystring or whatever it is called :-) and my laptop? It works fine without VPN, but won't accept my ssh when server is connected to VPN..
Funny thing is, now it seems OK, I can reach my server through DDNS service, but when my server asks me for the password it returns back as illegal. Any idea? Is there a mismatch between my RSD* keystring or whatever it is called :-) and my laptop? It works fine without VPN, but won't accept my ssh when server is connected to VPN..
Thanks,
Arve
And this is the output:
Apr 4 23:57:20 ENGWINST sshd[13597]: Accepted password for root from 192.168.10
.170 port 34430 ssh2
Apr 4 23:57:20 ENGWINST sshd[13597]: pam_unix(sshd:session): session opened for
user root by (uid=0)
Apr 5 00:00:01 ENGWINST CRON[13803]: pam_unix(cron:session): session opened for
user root by (uid=0)
Apr 5 00:00:01 ENGWINST CRON[13803]: pam_unix(cron:session): session closed for
user root
Apr 5 00:02:26 ENGWINST sshd[13597]: Received disconnect from 192.168.10.170: 1
1: disconnected by user
and the password is correct is correct..
Last edited by atengesdal; 04-04-2014 at 05:24 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.