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?
closed as too broad by Rui F Ribeiro, Sparhawk, mosvy, Thomas, slm♦ May 31 at 4:17
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
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
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.
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
ping6 fe80::1%vboxnet0. This one reason why link-local addresses are less useful: not all applications know how to specify the link ID.