I have client(Linux)-server(Windows) application. I have Windows 7 as a main OS and Ubuntu 18.04 on a VirtualBox. I need to test that the client can connect to the server through IPv6. How do I setup this?

  • How do you have IPv6 set up? How is networking setup on virtualbox? Is the client going to be run on the host or another VM? – Journeyman Geek May 28 '19 at 10:27
  • I am not sure that I have IPv6 set up. That is what I am asking. The network on VirtualBox is set as bridge but I can change this if needed. The client will be run on Ubuntu in VirtualBox. – xXx_CodeMonkey_xXx May 28 '19 at 10:42
  • Can you ping the local ipv6 address of the server from the client or vice versa? That might be enough to test – Journeyman Geek May 28 '19 at 11:21
  • I am not sure how. I tried to use ping6 and a bunch of Link-local IPv6 addresses (fe80::...) without any success. If I understand correctly I need not a link-local address, but I don't know how to get it. – xXx_CodeMonkey_xXx May 28 '19 at 14:00

I need to test that the client can connect to the server through IPv6.

You need to look at both ends. Only Linux endpoints would be on-topic for this site. (But you can see how far you can get. And if you get far enough, you can look for what works on Windows :-).

There are only about four possibilities.

Run this command: ip -6 addr

1. No IPv6 address: you have no lines starting with inet6. Test fail.

2. IPv6 link-local addresses only: the inet6 lines underneath the network interface which faces your target network all begin with fe80::. Technically it is possible to use link-local addresses, however some apps do not support them. If possible, resolve this situation i.e. treat it as a test failure.

Which network interface faces your target network?

  • Linux loopback interface is called lo. Ignore it.
  • Most Linux physical interfaces start with e (Ethernet), wl (wireless), ww (wide-area wireless), or less likely ppp (miscellaneous nonsense :-P). In your case you will ignore these.
  • Linux interfaces towards virtual machines tend to be named starting with v. VirtualBox uses vboxnet, and libvirt (virt-manager) uses virbr. In your case, the interface you want is almost certainly one of these.

3. Potentially routable ipv6 address: i.e. at least one address which does not start fe80::. Test has not failed - yet :-). Continue to next step.

Having identified a routable ipv6 address, you can test connecting to it from the other system.

ping6 is OK - if you know ping is not blocked by a firewall.

Prefer not to block ping in your firewalls, unless the firewall is blocking all incoming connections. Otherwise, it doesn't really make sense, and you're just making life harder for yourself.

If you cannot allow ping

Your application will have instructions somewhere as to which number port (and which type of port) it uses, in order to allow it through a firewall.

To test connecting to a TCP port, I would use sudo nmap -sT -p 1,$MYPORT $MYADDRESS. You can also use sudo nmap -sT -F $MYADDRESS to scan common ports. The latter might be useful if it shows it is possible to make some connection on a different port, e.g. maybe you forgot to allow the right port through a firewall.

To test UDP ports, use -sU instead of -sT. I would not bother with nmap -sU -F because UDP scans can be much slower than TCP scans.

To see what a successful test looks like, scan the address ::1 (localhost). If you do not already have an open port on localhost, open a second terminal window and run ncat -l ::1 22, to run a fake SSH service which nmap will detect.

Link-local addresses

If you must connect to a link-local address, you will need to include a link ID. E.g. to ping fe80::1 on link vboxnet0, run ping6 fe80::1%vboxnet0. This one reason why link-local addresses are less useful: not all applications know how to specify the link ID.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.