LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-04-2021, 07:36 AM   #1
bennypr0fane
Member
 
Registered: Jan 2012
Location: Central Europe
Distribution: Manjaro, Kubuntu
Posts: 171

Rep: Reputation: Disabled
Why can't I connect to my PiVPN server from some networks?


I have a Raspberry Pi acting as VPN server using PiVPN/OpenVPN in one of our offices. I can SSH to it from my laptop over VPN from my home.
When at our second office with my laptop, the server is unreachable, I can't get into the remote network.
For one of my colleagues, it's similar. She can reach the VPN/get into the office network from my home router, but not from her home.
What are possible reasons for the connection obviously well-set up and working, but not from all locations?
 
Old 03-04-2021, 09:17 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,152

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
With no error messages, there's not much to go on. The output of ssh -v user@address might give some indication of where it fails.
 
1 members found this post helpful.
Old 03-04-2021, 09:57 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,757

Rep: Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930
I agree not much to go on. No idea how your credentials or users profiles are configured.

I assume others connect to the VPN and they can connect to the server from the second office or other locations?

I assume your laptop is running linux, are you using the network manager built in openvpn client or a separate openvpn client?

What about your colleague that can not connect? What operating system and client.

What about your colleagues that can?

Do you have unique/seperate credentials for each user?
 
1 members found this post helpful.
Old 03-04-2021, 01:08 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,699

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by bennypr0fane View Post
I have a Raspberry Pi acting as VPN server using PiVPN/OpenVPN in one of our offices. I can SSH to it from my laptop over VPN from my home.
When at our second office with my laptop, the server is unreachable, I can't get into the remote network.
For one of my colleagues, it's similar. She can reach the VPN/get into the office network from my home router, but not from her home.
What are possible reasons for the connection obviously well-set up and working, but not from all locations?
Aside from the requests for information and advice given, the simple answer is probably due to network restrictions/firewalls.

Since you know it works at all, you rule out any misconfigurations, and you also rule out your office network at location 1. That leaves the network at your second location, and your co-workers ISP/router/modem. They may be blocking ports or filtering traffic, which is the likely reason.
 
1 members found this post helpful.
Old 03-05-2021, 04:38 PM   #5
bennypr0fane
Member
 
Registered: Jan 2012
Location: Central Europe
Distribution: Manjaro, Kubuntu
Posts: 171

Original Poster
Rep: Reputation: Disabled
Thanks for your questions and hints:
So I'm running Linux (Manjaro) on my laptop and imported the VPN connection profile using the built-in network-manager. Same goes for my co-worker (Lubuntu, LXDE, built-in VPN client).
The situation I described was such that Windows clients on location 2 were connected to the server@location1 through the OpenVPN GUI app, but I couldn't reach it over my laptop@location2.
However, right now the situation at the server's location has changed (a co-worker got the router replaced without telling, so there's that...), meaning I'll probably have to set up the whole thing from scratch aynway.

Basically all the clients that are supposed to VPN in are Windows desktops, except for me (admin) and that one co-worker.

I was told there can be conflicts of IP-addresses between networks, for instance if both access points DHCP 192.168.0.subnets, and DHCP server is looked up at same IP in target(server) network as something else in the originating(clients)network (you can clearly tell this is my first time doing this - I came to this company with PiVPN beteen locations 1 and 2 already set up, they have a very messy situation).
Other bit of unverified information I caught is that a typical VPN service will isolate the client from its originating network once connected to avoid this type of problems.

So I suspect: A. This client isolation has not been in place here and B. One home router just happens to DHCP assign IPs that aren't taken in the remote network, while another does not. These home routers provided by ISP with proprietary/branded firmware tend to give you very little control over how they manage the network.

1. Do you think there's anything to my theory?
2. If yes, how would you go about resolving the issue when first setting everything up? It's a small network with half a dozen clients max on each location (only 2). If isolating the client as described above is the standard way for avoiding IP conflicts (then I have no idea why my predecessor didn't do it that way in the first place), what's it called (good keywords to search for)? What would be a good starting point for reading?
3. If no, any other useful pointers for a noob? Cool command for diagnosing (taking note of the above one, much appreciated)?
Thanks very much!
 
Old 03-06-2021, 09:51 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,699

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by bennypr0fane View Post
Thanks for your questions and hints:
So I'm running Linux (Manjaro) on my laptop and imported the VPN connection profile using the built-in network-manager. Same goes for my co-worker (Lubuntu, LXDE, built-in VPN client).
The situation I described was such that Windows clients on location 2 were connected to the server@location1 through the OpenVPN GUI app, but I couldn't reach it over my laptop@location2.
However, right now the situation at the server's location has changed (a co-worker got the router replaced without telling, so there's that...), meaning I'll probably have to set up the whole thing from scratch aynway.

Basically all the clients that are supposed to VPN in are Windows desktops, except for me (admin) and that one co-worker.

I was told there can be conflicts of IP-addresses between networks, for instance if both access points DHCP 192.168.0.subnets, and DHCP server is looked up at same IP in target(server) network as something else in the originating(clients)network (you can clearly tell this is my first time doing this - I came to this company with PiVPN beteen locations 1 and 2 already set up, they have a very messy situation).
Other bit of unverified information I caught is that a typical VPN service will isolate the client from its originating network once connected to avoid this type of problems.

So I suspect: A. This client isolation has not been in place here and B. One home router just happens to DHCP assign IPs that aren't taken in the remote network, while another does not. These home routers provided by ISP with proprietary/branded firmware tend to give you very little control over how they manage the network.

1. Do you think there's anything to my theory?
2. If yes, how would you go about resolving the issue when first setting everything up? It's a small network with half a dozen clients max on each location (only 2). If isolating the client as described above is the standard way for avoiding IP conflicts (then I have no idea why my predecessor didn't do it that way in the first place), what's it called (good keywords to search for)? What would be a good starting point for reading?
3. If no, any other useful pointers for a noob? Cool command for diagnosing (taking note of the above one, much appreciated)?
Thanks very much!
It has nothing to do with IP addresses, and unless you SPECIFICALLY configure a VPN to 'isolate' traffic, it does not...it opens an encrypted tunnel between two networks. Whatever routes/information you pass between them is up to the configuration.

Again...this is back to the VPN port being blocked somewhere, either in a firewall, or from the ISP's side of things. There is no 'cool command' that you need, since the fact it doesn't work TELLS YOU that the port is blocked. So contact the network admin from the location where things don't work and ask.
 
  


Reply

Tags
openvpn, vpn



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot connect to corporate networks: can't find the server at start.ubuntu.com LaVenerabile Linux - Networking 3 01-11-2015 04:41 AM
[SOLVED] only Firefox fails to connect in some networks using Fedora 14 halej Linux - Networking 3 06-27-2011 01:03 AM
Why can I see wireless networks but never connect, WPA/WEP or open? Dan.b Linux - Newbie 3 09-03-2009 10:43 PM
I am bridging 2 networks, but only want the Bridge machine to see both networks. themrrobert Linux - Networking 1 02-17-2009 12:40 PM
Some SSH clients can connect, some cannot softbasejoe Linux - Server 16 06-24-2008 12:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration