Dns problem IPV6 against IPV4?

0

Hi,
French user of lightsail , on a new VM created few days, i get something I'd like to know where it could be checked and what to do?

From my VM running debian 9.5 (3cx phone system) I try to connect ot an external FTP server in my location. From a bunch of machines it works fine with something like https://fqdn:port number but on that new VM using the same returns each time "impossible to connect"

If I change in ftp url, FQDN by my Public IPV4 address then it works like a charm.

So is it possible to know if on that new VM DNS request resolve with prefered IPV4 address or IPV6, because on my router only public IPV4 is forwarded to FTP port.
But like I said above, others computer are able to connect with URL using FQDN
also ping or nslookup from VM console is resolving the FQDN.

What do you think about this ?
Thanks for any help.

Edited by: cgn06 on Jan 14, 2021 10:50 AM

cgn06
asked 3 years ago867 views
3 Answers
0

Where do you change the FTP url? Is it on the VM running debian or on the FTP server? Do you allow IPv6 incoming/outgoing traffic on the FTP server? In general, FQDN resolves to both IPv4 and IPv6.

AWS
answered 3 years ago
0

HI,
I change URL in my 3CX phone system, only software running in debian 9.5 VM.
FTP server is on premise where lots of others phone system do the same FTP backups (fine, with FQDN URL) as I try with this new VM and not working.

On premise I have a router with IPV4 and a port is forwarded to FTP server.

I already got some problems with windows machine having DNS request answered first with IPv6 instead of V4 and got some problems like today , but it was with local windows computer so I knew what to do.
For a cloud machine I'm not able to find what to check and where.

cgn06
answered 3 years ago
0

I answer myself if it may help someone else with same problem

From a SSH session do following commands to disable IPV6 on all interfaces with SYSCTL

Do a ifconfig to see if IPV6 is enabled on network settings, if it is then
sysctl -w net.ipv6.conf.all.disable_ipv6=1 (disable ipv6 all interfaces)
sysctl -w net.ipv6.conf.all.autoconf=0 (disable auto config all interfaces)
sysctl -w net.ipv6.conf.default.disable_ipv6=1 (disable ipv6 from default settings)
sysctl -w net.ipv6.conf.default.autoconf=0(disable autoconfig by default)
do once more a ifconfig to check there's no more IPV6 inet6 lines

Last step to write these changes at EOF Sysctl.conf
Edit with nano /etc/sysctl.conf
add these lines:

Disabling ipv6 all interfaces

net.ipv6.conf.all.disable_ipv6 = 1

disabling autoconfig all interfaces

net.ipv6.conf.all.autoconf = 0

disabling ipv6 for all new added interfaces

net.ipv6.conf.default.disable_ipv6 = 1

disabling autoconfig for new interfaces

net.ipv6.conf.default.autoconf = 0

After this is saved in file, reboot your instance , re open SSH, do a ifconfig to check there's no more ipv6 here, done ;)

cgn06
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions