X
X
X
X

Wissensdatenbank

StartseiteWissensdatenbankLinux - MultiVPS IPv6+IPv4ICMP - IPv4 Pings And NAT IPv4 Port...

ICMP - IPv4 Pings And NAT IPv4 Port Range Testing

(Last Updated: 29-10-2024. Includes recent technical changes and adjustments.)

Outbound ICMP website pinging via IPv4 on MultiVPS, outside of the allocated port range, is mostly not supported, due to a technical specific - the executed NAT64 implementation, at both the main server and the public service fallback. The packet header is changed, meaning that it wouldn't be recognisable. 

ICMP over direct IPv6-to-IPv6 is always supported in all protocols. 

If you wish to use the 10-port range for TCP or the 5-port range for UDP, predicted by our NAT IPv4 implementation

The alternative to this is to test any connection using a process that is listening, on the VPS and over IPv6, and then attempt to send anything from the other side over the bonded ports. Remember, ports are always pre-opened at the given range for you.

Example for TCP: attempt to change /etc/ssh/sshd_config to one port within the predicted port range of your VPS.
Ensure "PubkeyAuthentication" is set to No and uncommented (without the #), and "PasswordAuthentication" is set to Yes and uncommented.  Save. Now do:

sudo systemctl restart sshd

in order for the SSH service to restart. Ensure it's listening on both formats prior to any testing.

After that, you can attempt to login using PuTTY, MobaXterm or any SSH client, inserting the global server's IPv4, the VPS Linux user (root) and that specific port you've just put at the SSH service, and it will work flawlessly.

This was tested on a MobaXterm client under Windows and an IPv4-only connection, with socat as the underlying technology, in 29-10-2024, under AlmaLinux 9.4 and Debian 12.

Example for UDP: install netcat-openbsd, available under Debian or Ubuntu systems. After install, ensure you don't want to run any further commands prior to netcat, and run the following command:

nc -6 -u -l -p [number of your port]

where [number of your port] will be the UDP-exclusive port-range you have on your VPS for NAT IPv4 (check the Knowledge Base article for NAT IPv4 port calculation). 

The process will start to listen, over IPv6, at the port you've chosen, and will stay like that.

After that, attempt to send anything (text, message, etc) via UDP:

From Windows Powershell
$message = "Test UDP"; $udpClient = New-Object System.Net.Sockets.UdpClient; $udpClient.Connect("116.xxx.xxx.xxx", [number of your port]); $bytes = [Text.Encoding]::ASCII.GetBytes($message); $udpClient.Send($bytes, $bytes.Length); $udpClient.Close()

From Linux
echo "Test UDP" | nc -u -w1 116.xxx.xxx.xxx [number of your port]

where "116.xxx.xxx.xxx" is the public global IPv4 at server-level that you have, and [number of your port] will be the UDP-exclusive port number, which must be the same exact port number your process is listening on the VPS, AND ALSO the same exact port number of your UDP port range.

If you recieve "Test UDP" on your VPS, everything is working.

This was tested in 29-10-2024, on a MobaXterm client under Windows and an IPv4-only access, through a VPS with Debian 12. Socat is also the underlying technology.

We cannot guarantee the "nc" package under RHEL-based systems is the technical equivalent of the netcat-openbsd available at Debian and Ubuntu (wasn't tested), also because of their habit of backtracking changes, but we can assure the netcat-traditional package is not suitable for this task, because it doesn't support the -6 parameter for IPv6 listening. 

If you want to calculate IPv4 NAT ports on your VPS, click here.

Finden Sie nicht die Informationen, die Sie suchen?

Ticket erstellen
Fanden Sie es nützlich?
(99 mal angesehen / 1 Kunden fanden es hilfreich)

Powered by WISECP
Top