New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
ipv6 connectivity issue
malcommerlyn
Member
Hi everyone,
I am having an issue with my server.
I have a server that is unable to execute the following command:
root@server:~# ping6 -c3 google.com
PING google.com(fra24s12-in-x0e.1e100.net (2a00:1450:4001:831::200e)) 56 data bytes
It gets stuck at this point and does not proceed.
My provider says ipv6 is attached to the server
Even the command "ping google.com" doesn't work:
root@server:~# ping google.com
PING google.com(fra24s12-in-x0e.1e100.net (2a00:1450:4001:831::200e)) 56 data bytes
However, if I modify the command to:
ping -4 google.com
root@server:~# ping -4 google.com
PING (142.250.184.238) 56(84) bytes of data.
64 bytes from fra24s12-in-f14.1e100.net (142.250.184.238): icmp_seq=1 ttl=111 time=51.8 ms
64 bytes from fra24s12-in-f14.1e100.net (142.250.184.238): icmp_seq=2 ttl=111 time=52.0 ms
64 bytes from fra24s12-in-f14.1e100.net (142.250.184.238): icmp_seq=3 ttl=111 time=51.9 ms
64 bytes from fra24s12-in-f14.1e100.net (142.250.184.238): icmp_seq=4 ttl=111 time=51.9 ms
64 bytes from fra24s12-in-f14.1e100.net (142.250.184.238): icmp_seq=5 ttl=111 time=51.9 ms
64 bytes from fra24s12-in-f14.1e100.net (142.250.184.238): icmp_seq=6 ttl=111 time=51.8 ms
I would like to establish a tunnel with HE, so my server needs to support the execution of this command:
ping6 -c3 google.com &>/dev/null && echo "Connected successfully" || echo "Connection error"
Here are all the configuration details of the server.
root@server:~# ip -6 addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
inet6 2a06:41c0:1:1::4cbf:9581/64 scope global
valid_lft forever preferred_lft forever
root@server:~# sysctl -a 2>/dev/null | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.venet0.disable_ipv6 = 0
root@server:~# netstat -tunlp | grep -iE 'udp6|tcp6'
tcp6 0 0 :::80 :::* LISTEN 286/apache2
tcp6 0 0 :::22 :::* LISTEN 285/sshd: /usr/sbin
tcp6 0 0 ::1:25 :::* LISTEN 630/exim4
root@server:~# lsof -a -i6
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 327 root 4u IPv6 2025669122 0t0 TCP *:http (LISTEN)
apache2 331 www-data 4u IPv6 2025669122 0t0 TCP *:http (LISTEN)
exim4 701 Debian-exim 5u IPv6 2025669967 0t0 TCP localhost:smtp (LISTEN)
sshd 811 root 4u IPv6 2025656982 0t0 TCP *:ssh (LISTEN)
root@server:~# ip a | grep inet6
inet6 ::1/128 scope host
inet6 2a06:41c0:1:1::4cbf:9581/64 scope global
root@server:~# ip -6 route
2a06:41c0:1:1::/64 dev venet0 proto kernel metric 256 pref medium
default dev venet0 metric 1024 pref medium
root@server:~# curl -I -4 https://google.com
HTTP/2 301
location: https://www.google.com/
content-type: text/html; charset=UTF-8
content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-hRzwMxCxxzv_4V7WUpXErw' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
date: Wed, 17 Jan 2024 15:14:43 GMT
expires: Fri, 16 Feb 2024 15:14:43 GMT
cache-control: public, max-age=2592000
server: gws
content-length: 220
x-xss-protection: 0
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
root@server:~# curl -I -6 https://google.com
curl: (28) Failed to connect to google.com port 443 after 127426 ms: Connection timed out
And interface file
# This configuration file is auto-generated.
# WARNING: Do not edit this file, otherwise your changes will be lost.
# Please edit template /etc/network/interfaces.template instead.
auto lo
iface lo inet loopback
# Auto generated venet0 interfaces
auto venet0
iface venet0 inet static
address 127.0.0.1
netmask 255.255.255.255
broadcast 0.0.0.0
up route add default dev venet0
auto venet0:0
iface venet0:0 inet static
address 104.247.164.125
netmask 255.255.255.0
iface venet0 inet6 static
address 2a06:41c0:1:1::4cbf:9581/64
up ip -6 r a default dev venet0
Can you please help me to solve the issue?
Thank you
Comments
@yoursunny
Which provider is this?
Please run these commands in the given order and paste the output:
@BasToTheMax local provider in Turkey
Thank you!
ip -6 neigh - returns nothing
This is inside OpenVZ container.
You need to run it on the host machine.
If you do not control the host machine, you need to contact the administrator.
They keep saying that your server has been assigned an IPv6 address and that's all.
This is the only machine I have access to.
Could this be related to the interface file? Or is the provider's method of assigning IPv6 addresses incorrect?
Since they are unwilling to offer assistance, I should ask them a specific question and request their help.
What specific question should I ask them?
@yoursunny
They said they have fixed something.
I can send a ping6 to Google.
However, this is what I receive when I check the hostname:
Now, my script identifies the 127.0.0.1 as a hostname and messes up the IPv6 tunneling.
You need a better script.
To identify location IPv6 that you use for outgoing connections, you can use this command in the script:
This assumes the machine is using a default route, i.e. not for a BGP VM.