LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-31-2023, 05:40 PM   #1
DoorDaesh
LQ Newbie
 
Registered: Jul 2020
Posts: 23

Rep: Reputation: Disabled
Home router is unreachable from Virtual Private Server


I ssh into my VPS from my home PC. The VPS has internet access and can download any packages it needs, but it cannot reach my home router. when I run
Code:
traceroute -m 255 ${router_ip}
it prints 15 hops and everything after that is
Code:
* * *

Last edited by DoorDaesh; 10-31-2023 at 05:42 PM.
 
Old 10-31-2023, 07:52 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
ICMP versus TCP/IP?

https://linux.die.net/man/8/traceroute

Last edited by jefro; 10-31-2023 at 07:54 PM.
 
Old 10-31-2023, 07:58 PM   #3
DoorDaesh
LQ Newbie
 
Registered: Jul 2020
Posts: 23

Original Poster
Rep: Reputation: Disabled
Are you saying that the traceroute command uses ICMP and that I should be using a tool that uses TCP/IP instead? If so, what should I run?

Edit:
Quote:
traceroute -T ${router_ip}
gives similar results.

Last edited by DoorDaesh; 10-31-2023 at 08:02 PM.
 
Old 10-31-2023, 08:37 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,329
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
Maybe I'm way off base here, but I must ask, is the VPS on the same subnet as the router?
 
Old 10-31-2023, 08:46 PM   #5
DoorDaesh
LQ Newbie
 
Registered: Jul 2020
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
is the VPS on the same subnet as the router?
My understanding of subnets is shaky but I'm pretty sure the answer is no. The VPS is on another continent from the router and neither the VPS nor router are on a VPN or VLAN.

Last edited by DoorDaesh; 10-31-2023 at 08:47 PM. Reason: concision
 
Old 10-31-2023, 09:05 PM   #6
DoorDaesh
LQ Newbie
 
Registered: Jul 2020
Posts: 23

Original Poster
Rep: Reputation: Disabled
When I type "what's my ip" into google on my home PC I get 38.xxx.xxx.xxx. The DDNS domain provided by my router manufacturer resolves to the same address. However, the router says its WAN IP is 100.xxx.xxx.xxx

Am I behind a CGNAT?

https://www.reddit.com/r/HomeNetwork...eb2x&context=3
 
Old 11-01-2023, 02:13 AM   #7
lvm_
Member
 
Registered: Jul 2020
Posts: 933

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Many routers can me configured to ignore ICMP requests and do so by default. Check your router settings. And your ISP can be doing the same.
 
Old 11-01-2023, 06:32 AM   #8
DoorDaesh
LQ Newbie
 
Registered: Jul 2020
Posts: 23

Original Poster
Rep: Reputation: Disabled
I think the answer lies with the Port Control Protocol, but I'm at a loss for how to implement it.

Last edited by DoorDaesh; 11-01-2023 at 06:32 AM. Reason: added hyperlink
 
Old 11-01-2023, 02:23 PM   #9
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 566

Rep: Reputation: Disabled
Try this one first:
https://phoenixnap.com/kb/tracepath-vs-traceroute

You could also use this one with tcp or udp instead of icmp:
https://www.cloudns.net/blog/linux-mtr-command/

Last edited by yvesjv; 11-01-2023 at 02:26 PM.
 
Old 11-01-2023, 03:51 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
What I understand is you can ssh to some IP address correct?? Then it follows that there is a port(s) open as well as protocol allowed and that one can access the IP address. Has nothing to do with anything else.

Not knowing more about this server I can't answer more. Where is it, who set it up, what is wrong ....
 
Old 11-02-2023, 12:06 AM   #11
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,728

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I get exactly the same behavior…ssh to a vps, traceroute to my router’s public (WAN) IP. Responses stop after reaching my ISPs network. I consider that normal, or at least typical, behavior. ISPs tend to limit tracing packets around their networks, considering that to be proprietary information. I’m OK with that.

Upon checking my IP “on Google,” I learned that I’m browsing via a VPN (Apple’s iCloud), although the connections on my server knows my real IP address, so not all traffic is going that way.
 
Old 12-04-2023, 09:36 AM   #12
jeniy
LQ Newbie
 
Registered: Dec 2023
Location: United States
Distribution: window, windows xp home, windows 98, white hat
Posts: 3

Rep: Reputation: 0
It appears that the home router cannot be accessed from the Virtual Private Server (VPS).
 
Old 12-04-2023, 11:28 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,638

Rep: Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966
Quote:
Originally Posted by jeniy View Post
It appears that the home router cannot be accessed from the Virtual Private Server (VPS).
Really??? That was stated above.
 
Old 12-04-2023, 02:08 PM   #14
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,454
Blog Entries: 7

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
This is expected behaviour, for many reasons.

The way around it is to set up something like OpenVPN at the VPS end and connect to it from the home end. At the home end, you'll need to set up a port forward on your router, and possibly some static routes if you wanted to reach a specific machine from there. This will give you two way traffic from each end.

BUT I'd only do that if you really need access to your home machine from the VPS.
 
1 members found this post helpful.
Old 12-04-2023, 03:24 PM   #15
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,728

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Yes. What rkelsen said.
For what purpose do you want to access your home PC from the remote server?
What are you wanting to accomplish and/or what problem are you trying to solve?

As I said, that’s how it works for me. I have no reason to connect to my home network from my remote server. If I want to move something from the server to my PC, I “pull” it…sftp GET, for example.
 
  


Reply



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
[SOLVED] Cascading ISP-Modem-Router and Private Router - No Internet connection on private one glupa4e Linux - Networking 15 01-28-2024 04:07 AM
iptables - Reply Forwarding Error / Destination unreachable (Host unreachable) keflex87 Linux - Networking 1 05-12-2015 12:03 AM
Network is Unreachable/Unknown host/Destination Host Unreachable [Debian] denv Linux - Networking 4 03-27-2014 02:58 PM
[SOLVED] Snort Signature: ICMP Destination Unreachable Port Unreachable very noisy mhollis Linux - Security 4 08-15-2011 02:01 PM
tftp - "Destination Unreachable" due to "Port Unreachable" renjithgopal Linux - Security 5 07-24-2003 10:36 AM

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

All times are GMT -5. The time now is 09:19 AM.

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