Solved How to delete IPV6 resolution on AWS lightsail Debian VM

Status
Not open for further replies.

AWS2P

Silver Partner
Basic Certified
Joined
Jan 9, 2014
Messages
5,076
Reaction score
1,096
Hello,
I have an issue due to IPV6 DNS first resolving a ftp FQDN url with IPV6, I need to point on my router IPV4 which has a specific port forwarded to my FTP server.

This works for all the PBXs i have now , but not on last installed few days ago on AWS Lightsail.

So my question is how to stop IPV6 DNS answers first or how to stop IPV6 on debian ?

I have others instance (from same machines) on AWS lightsail being able to resolve IPV4 using url like ftp://FQDN : port , so I'm sure it works and problem is only DNS IPv6 related.

I Have already got similar problem on a lan with W10 PC and quick solution was to disable IPV6 in NIC settings and instantly resolution came back to IPV4 and FTP access was working fine.
Problem here today , it's a cloud and debian machine so I'm lost on how to fix this.

Any help appreciate,
Thanks
 
Hello,
I have an issue due to IPV6 DNS first resolving a ftp FQDN url with IPV6, I need to point on my router IPV4 which has a specific port forwarded to my FTP server.

This works for all the PBXs i have now , but not on last installed few days ago on AWS Lightsail.

So my question is how to stop IPV6 DNS answers first or how to stop IPV6 on debian ?

I have others instance (from same machines) on AWS lightsail being able to resolve IPV4 using url like ftp://FQDN : port , so I'm sure it works and problem is only DNS IPv6 related.

I Have already got similar problem on a lan with W10 PC and quick solution was to disable IPV6 in NIC settings and instantly resolution came back to IPV4 and FTP access was working fine.
Problem here today , it's a cloud and debian machine so I'm lost on how to fix this.

Any help appreciate,
Thanks
Hi, as you can understand this is totally out of the scope of 3cx as this is up to the system administrator of the OS.
So I would recommend to check this on the Forums of Debian as a solution can be found there.
 
Hello Nikos,
Even if it's not directly 3CX related , I was hoping for an help or answer as you are with strong knowing on Debian and 3CX is hosting also on AWS no?
Thanks
Have a good day.
 
I answer myself if it may help someone else with same problem

My starting point VM AWS lightsail with V16.0.7.1078 running on debian 9.5

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
  1. sysctl -w net.ipv6.conf.all.disable_ipv6=1 (disable ipv6 all interfaces)
  2. sysctl -w net.ipv6.conf.all.autoconf=0 (disable auto config all interfaces)
  3. sysctl -w net.ipv6.conf.default.disable_ipv6=1 (disable ipv6 from default settings)
  4. 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 and 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 ;)
 
Last edited:
  • Like
Reactions: NikosT_3CX
Status
Not open for further replies.

Forum statistics

Threads
111,974
Messages
590,081
Members
164,899
Latest member
mazet