Author Topic: Funny PING problem  (Read 4305 times)

0 Members and 1 Guest are viewing this topic.

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6184
  • Country: gb
  • Doing electronics since the 1960s...
Funny PING problem
« on: October 09, 2024, 07:41:08 am »
I have a LAN, say 192.168.1.*

On that LAN I have a fixed IP device, a little win7-64 industrial PC, say 192.168.1.123

From any PC on that LAN I can ping the 123 one, I can run RDP to it, and I can browse it with File Explorer (by going to \\192.168.1.123).

I also have a VPN (from a remote site) terminating on the above LAN.

From the remote site I can ping or file-browse all devices on the above LAN. Except the .123 one!

But from the remote site I can run RDP (remote desktop) to the .123 device. So RDP works to .123 but I cannot ping it. I also cannot browse it by going to \\192.168.1.123 (the usual error code 0x80004005).

Yet pings (ICMP) cannot be disabled in the .123 firewall because one can ping it from another PC on the same LAN. Same for file browsing - cannot be disabled.

The VPN is IPSEC, site to site. Been working for years. All PCs are win7-64.

This is quite a narrow scenario and I wonder what it could be. Two things not working to .123. It is as if access was allowed from a local subnet only, but where might this be configured? But the VPN is terminating on the LAN i.e. something like 192.168.1.200 - that is how a VPN is supposed to work. The remote user is de facto on the LAN; he's not "remote".
« Last Edit: October 09, 2024, 08:03:19 am by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline gmb42

  • Frequent Contributor
  • **
  • Posts: 335
  • Country: gb
Re: Funny PING problem
« Reply #1 on: October 09, 2024, 09:57:44 am »
Have a look at Windows network profiles.  There are three, for domain, private and public and they set firewall restrictions accordingly.

Not entirely sure what such a decrepit OS supports, but in PowerShell I use
Code: [Select]
Get-NetConnectionProfile to see the profile of all interfaces and
Code: [Select]
Set-NetConnectionProfile InterfaceIndex xxx -NetworkCategory yyy to modify it.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6184
  • Country: gb
  • Doing electronics since the 1960s...
Re: Funny PING problem
« Reply #2 on: October 09, 2024, 11:23:21 am »
Quote
There are three, for domain, private and public

My point is that how can the .123 device tell?

A PC on the same subnet should appear the same as a PC on the far end of a VPN which terminates on the same subnet.

Looking at the firewall settings, private profile, I find, as expected, that enabling/disabling incoming firewall controls whether the remote ping works or not.

So I went to look through the firewall inbound rules to see which are for private profile and block but I see no obvious candidates. There is a lot of ICMPv6 but I have IPV6 disabled at the adapter properties.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 8908
  • Country: hr
Re: Funny PING problem
« Reply #3 on: October 09, 2024, 11:42:45 am »
Quote
There are three, for domain, private and public

My point is that how can the .123 device tell?

A PC on the same subnet should appear the same as a PC on the far end of a VPN which terminates on the same subnet.

Looking at the firewall settings, private profile, I find, as expected, that enabling/disabling incoming firewall controls whether the remote ping works or not.

So I went to look through the firewall inbound rules to see which are for private profile and block but I see no obvious candidates. There is a lot of ICMPv6 but I have IPV6 disabled at the adapter properties.

Might be stupid question, but did you try disabling FW altogether on .123 device for starters?
Do you have any AV software on it? ESET, for instance, has it's own FW too.
"Just hard work is not enough - it must be applied sensibly."
Dr. Richard W. Hamming
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6184
  • Country: gb
  • Doing electronics since the 1960s...
Re: Funny PING problem
« Reply #4 on: October 09, 2024, 11:48:05 am »
Quote
but did you try disabling FW altogether on .123 device for starters?

Yes - as I say above. It makes it work. Problem is, the number of potential rules to try turning on and off is vast.

No AV software.
« Last Edit: October 09, 2024, 11:56:50 am by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 8908
  • Country: hr
Re: Funny PING problem
« Reply #5 on: October 09, 2024, 11:55:25 am »
Quote
but did you try disabling FW altogether on .123 device for starters?

Yes - as I say above. It makes it work. Problem is, the number of potential rules to try turning on and off is vast.

No AV software.

Sorry, I didn't pick it up.
Well that is good. That means it is FW that is a problem. Now you know for sure where you should fix.
Now to figure out how.

While VPN (IPSec tunnels) tunnel you into network, they do it by encapsulation, layer into another layer.
What device is VPN server and how do you connect to it on your side (Win built in VPN or something else?)?

"Just hard work is not enough - it must be applied sensibly."
Dr. Richard W. Hamming
 
The following users thanked this post: peter-h

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6184
  • Country: gb
  • Doing electronics since the 1960s...
Re: Funny PING problem
« Reply #6 on: October 09, 2024, 11:58:46 am »
I've set up firewall logging but it shows no packets. OTOH there are possible complications with the fw have write access to the log file... Weird!

The VPN terminator is a Draytek 2955 router - actually a 2955 at both ends.

The VPN is brought up automatically when you generate traffic to the "other" subnet. In general it runs 24/7, probably due to windoze discovery packets etc etc.

I need to get fw logging working...

Ha! Got something. Windoze caches the logfile data and writes it to the file after some time... Now I see, under the Private log

2024-10-09 12:51:55 DROP ICMP [remote PC ETH IP] 192.168.1.123 - - 60 - - - - 8 0 - RECEIVE

Now, which fw rule could this be?

Now moving onto the nonworking file browsing, I see

2024-10-09 13:03:49 DROP TCP [remote PC ETH IP] 192.168.1.123 63677 445 52 S 889718469 0 8192 - - - RECEIVE

So, that .123 machine is seeing the remote machine's IP! Well, not its public (ISP issued) IP but its ETH adapter IP, of the form 192.168.x.y (where x is not 1 - it is another fixed IP machine).

It will be buried among this huge list (a piece shown)



Turns out that the "local subnet" limitation on item 1 in above list controls the ping! And the VPN remote machine is not on the local subnet...

It would be nice to be able to edit the "local subnet" globally.

And sure enough the "local subnet" was the issue for file browsing too. I changed the Private lines connected with file and printer sharing to Any and browsing and file transfer etc now works.

Funny... not seen this behaviour before on many win7-64 installs I've done. Maybe the DVD was some odd flavour like "enterprise" :)

Thank you. Every day is a school day. I was thinking that a remote (over-VPN) machine ends up on a local IP (because in the routers you can configure such an IP) but clearly this is not happening. Maybe that setting is on the PPTP VPNs and not the site to site IPSEC ones.
« Last Edit: October 09, 2024, 12:53:26 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 8908
  • Country: hr
Re: Funny PING problem
« Reply #7 on: October 09, 2024, 12:56:48 pm »
I've set up firewall logging but it shows no packets. OTOH there are possible complications with the fw have write access to the log file... Weird!

The VPN terminator is a Draytek 2955 router - actually a 2955 at both ends.

The VPN is brought up automatically when you generate traffic to the "other" subnet. In general it runs 24/7, probably due to windoze discovery packets etc etc.

I need to get fw logging working...

Ha! Got something. Windoze caches the logfile data and writes it to the file after some time... Now I see, under the Private log

2024-10-09 12:51:55 DROP ICMP [remote PC ETH IP] 192.168.1.123 - - 60 - - - - 8 0 - RECEIVE

Now, which fw rule could this be?

Now moving onto the nonworking file browsing, I see

2024-10-09 13:03:49 DROP TCP [remote PC ETH IP] 192.168.1.123 63677 445 52 S 889718469 0 8192 - - - RECEIVE

So, that .123 machine is seeing the remote machine's IP! Well, not its public (ISP issued) IP but its ETH adapter IP, of the form 192.168.x.y (where x is not 1 - it is another fixed IP machine).

It will be buried among this huge list (a piece shown)



Turns out that the "local subnet" limitation on item 1 in above list controls the ping! And the VPN remote machine is not on the local subnet...

It would be nice to be able to edit the "local subnet" globally.

And sure enough the "local subnet" was the issue for file browsing too. I changed the seven lines to Any and browsing now works.

Funny... not seen this behaviour before on many win7-64 installs I've done. Maybe the DVD was some odd flavour like "enterprise" :)

Thank you. Every day is a school day. I was thinking that a remote (over-VPN) machine ends up on a local IP (because in the routers you can configure such an IP) but clearly this is not happening. Maybe that setting is on the PPTP VPNs and not the site to site IPSEC ones.

GREAT!!
Happy to help.

IPSEC is lots of witchcraft, really. Packets are wrapped in other packets, really like onion....
And then unwrapped on the other side.
Your packets will have local IP address, but it will be remote...

There are many details that you only see if you fire up Wireshark and open IP headers....

On standard, old fashioned, no security LANs it is all transparent. But as soon as you start going deeper.....
"Just hard work is not enough - it must be applied sensibly."
Dr. Richard W. Hamming
 
The following users thanked this post: peter-h

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6184
  • Country: gb
  • Doing electronics since the 1960s...
Re: Funny PING problem
« Reply #8 on: October 09, 2024, 01:48:48 pm »
Yes; the only way to get an IPSEC VPN working is to buy both ends from the same vendor and follow their app notes precisely.

Like this https://www.draytek.co.uk/support/guides/kb-lantolan-ipsec or this https://www.draytek.co.uk/archive/vpn_setup.html.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 6822
  • Country: au
Re: Funny PING problem
« Reply #9 on: October 10, 2024, 08:49:27 am »
Are you sure it's not a firewall rule? Even if the VPN connection lands in the same IP space, there may be seperate rules that govern the VPN interfaces. I'd start there.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 9312
  • Country: de
  • A qualified hobbyist ;)
Re: Funny PING problem
« Reply #10 on: October 10, 2024, 09:26:26 am »
The VPN is IPSEC, site to site. Been working for years. All PCs are win7-64.

This is quite a narrow scenario and I wonder what it could be. Two things not working to .123. It is as if access was allowed from a local subnet only, but where might this be configured? But the VPN is terminating on the LAN i.e. something like 192.168.1.200 - that is how a VPN is supposed to work. The remote user is de facto on the LAN; he's not "remote".

I'm a bit confused. A site-to-site IPSec VPN means that both networks have their own IP address space, are connected via the IPSec tunnel and routed via the VPN gateways. When both sites use the same private address space they need to set up NAT and additional address space to address each other. The other typical setup is end-to-site (road warrior). In this case a single PC/notebook uses an IPSec client to connect to a remote site and gets an IP address of the remote site. Additionally there can be special configurations. Which setup do you have? Every detail is important!
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 9312
  • Country: de
  • A qualified hobbyist ;)
Re: Funny PING problem
« Reply #11 on: October 10, 2024, 09:37:03 am »
Yes; the only way to get an IPSEC VPN working is to buy both ends from the same vendor and follow their app notes precisely.

Usually most IPSec devices/clients work with each other after tweaking some settings. Some don't because they have stupid default settings which can't be changed. And I've even seen IPSec products from the same vendor beeing incompatible. IPSec is quite complex and it's easy to make mistakes.
 

Offline gmb42

  • Frequent Contributor
  • **
  • Posts: 335
  • Country: gb
Re: Funny PING problem
« Reply #12 on: October 10, 2024, 10:26:02 am »
Yes; the only way to get an IPSEC VPN working is to buy both ends from the same vendor and follow their app notes precisely.

Like this https://www.draytek.co.uk/support/guides/kb-lantolan-ipsec or this https://www.draytek.co.uk/archive/vpn_setup.html.

Only in your limited experience.  A single counterpoint disproves your assertion; I use a Windows desktop (native IPSEC) to connect to the company firewall (not Windows based) over an IPSEC VPN for hours every working day.  Not a problem.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 6184
  • Country: gb
  • Doing electronics since the 1960s...
Re: Funny PING problem
« Reply #13 on: October 10, 2024, 11:43:15 am »
Quote
Are you sure it's not a firewall rule? Even if the VPN connection lands in the same IP space, there may be seperate rules that govern the VPN interfaces. I'd start there.

The issue was a firewall rule, limiting access to the local subnet.

What stumped me is my belief that a VPN terminates on some IP of the LAN so e.g. if you connect to 192.168.1.* with a VPN, the remote device will appear on some configured IP e.g. 192.168.1.100. And I have seen such setups. But this VPN presents the remote device differently.

Quote
In this case a single PC/notebook uses an IPSec client to connect to a remote site and gets an IP address of the remote site

Yes; in the Draytek terminology that is the "teleworker" setup. I am using their site-to-site VPN setup. Actually this reminds me... I ought to test the teleworker setup also.

Quote
I use a Windows desktop (native IPSEC) to connect to the company firewall (not Windows based) over an IPSEC VPN for hours every working day.  Not a problem.

You had someone clever set it up :)
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4879
  • Country: us
Re: Funny PING problem
« Reply #14 on: October 10, 2024, 03:12:38 pm »
What stumped me is my belief that a VPN terminates on some IP of the LAN so e.g. if you connect to 192.168.1.* with a VPN, the remote device will appear on some configured IP e.g. 192.168.1.100. And I have seen such setups. But this VPN presents the remote device differently.

That's not generally true and definitely not for a site to site VPN.

In a site to site VPN, the VPN acts as a router connecting two separate subnets so that they can access each other.  Devices on each site continue to use their existing IPs which need to be assigned from separate subnets.  This is used if a business has two buildings, each of which has several clients, maybe a printer or file server and everyone wants to be able to access the other site in both directions.  On each side, local traffic does not go through the VPN.

Even remote worker VPNs often have a separate subnet for clients.  So I your example, the host network might be 192.168.1.*, but there is a separate VPN subnet 192.168.2.*, and each client gets a unique IP on that network. 

It's possible to set up remote worker VPNs so that the clients appear directly on the host primary subnet but it's definitely not the only way.
 
The following users thanked this post: peter-h

Offline gmb42

  • Frequent Contributor
  • **
  • Posts: 335
  • Country: gb
Re: Funny PING problem
« Reply #15 on: October 11, 2024, 10:02:23 am »

Quote
I use a Windows desktop (native IPSEC) to connect to the company firewall (not Windows based) over an IPSEC VPN for hours every working day.  Not a problem.

You had someone clever set it up :)

I confess, it was me that configured both ends and provided a simple PowerShell script for the rest of the users allows them to connect via an IPSec VPN as well.  Not sure if that makes me clever or just able to read documentation.  Not the worst thing I've ever had to deal with.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->