Giter Club home page Giter Club logo

Comments (30)

tambry avatar tambry commented on May 18, 2024 2

@nwtgck Thanks for still being interested in getting this to work!

Try this in /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 118.27.28.243/23
    gateway 118.27.28.1

iface eth0 inet6 static
    address 2400:8500:1801:414:118:27:28:243/64
    gateway 2400:8500:1801:414::1

If this doesn't work either, then also take the output of ip address show before reverting.

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024 2

@tambry You are so great!!!

I applied your setting. Then, finally, we got IPv6 support πŸŽ‰
image
(from: https://ipv6-test.com/validate.php)

Thank you so much for everything. I'll learn about IPv6 more and I'll check IPv6 support before service starts in the future.

The log of this issue can be useful information for future visitors. In very hard conditions, you are in remote and not authorized to the server, but you could support IPv6. I believe people like you are very essential to spread IPv6 to the world.

from gh-card.

tambry avatar tambry commented on May 18, 2024 1

@nwtgck Awesome to see that you saw this through to the end and that it's working now. πŸ™‚

It remains unclear to me why the IPv6 address wasn't automatically configured on the server through DHCPv6. But at least I learned something new and I hope you did too!

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024 1

@tambry

It remains unclear to me why the IPv6 address wasn't automatically configured on the server through DHCPv6.

It should work but it didn't. I see. I don't have knowledge because this is my first time to support IPv6 in my server. I think you imply the configuration using DHCP can be used in some servers. When I manage a server, I also try the configuration to know about IPv6. I think DHCP setting is more maintainable because the IP is not hardcoded, so I want to try.

But at least I learned something new

This is very good news for me. Yes! I learned a lot and I think I will learn more to read and understand your configuration.

Thank you very much for everything.

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

This is a kind of note for me and maybe others.

IPv6 checker for Web server: https://ipv6-test.com/validate.php

The result:
image

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

After DNS setting for IPv6.

image

from gh-card.

tambry avatar tambry commented on May 18, 2024

Thanks for working on this!

With the AAAA record added I am seeing the timeout for IPv6.
Could you check if the server's firewall permits HTTP/HTTPS on IPv6?

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry Thanks.

I merged #3. And I've done git pull; docker-compose build; docker-compose restart reverse_proxy to refresh in the production: gh-card.dev. But, I have the same result as the last one. This means IPv6 web server is not supported now.

Inbound 80 and 443 ports on IPv6 are accessible in the VPS setting. I'm not sure I should do something on OS setting, Ubuntu 16. So, I'm searching for it

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck Could you give the output from ip6tables -S?

Do you use ufw to configure the firewall? Have you run sudo ufw allow http and sudo ufw allow https?
Check if /etc/default/ufw contains IPV6=yes.

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry Thank you so much for helping.

Could you give the output from ip6tables -S?

$ ip6tables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

Check if /etc/default/ufw contains IPV6=yes.

$ cat /etc/default/ufw  | grep IPV6
IPV6=yes

So it contains.

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

I'm not familiar with IPv6. I'm not sure the following is helpful. But I have the following results from lsof.

$ sudo lsof -i:80
COMMAND     PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
docker-pr 19591 root    4u  IPv6 3322172      0t0  TCP *:http (LISTEN)

$ sudo lsof -i:443
COMMAND     PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
docker-pr 19564 root    4u  IPv6 3322136      0t0  TCP *:https (LISTEN)

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck That output confirms that the web server is listening on IPv6. That's good. Just need to figure out why IPv6 packets to the server are being dropped.

What's the output of ip address show and ipconfig?
Contents of /etc/network/interfaces?

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry Thanks. Here is /etc/network/interfaces.

$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 dhcp
accept_ra 1

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck What is the output of ip address show? I think your server might not be getting an IPv6 address from the DHCP for some reason.

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry Thank you. Here is ip address show.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 02:02:76:1b:1c:f3 brd ff:ff:ff:ff:ff:ff
    inet 118.27.28.243/23 brd 118.27.29.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::2:76ff:fe1b:1cf3/64 scope link 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:af:c2:62:a3 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:afff:fec2:62a3/64 scope link 
       valid_lft forever preferred_lft forever
283: br-53f561d9bc4a: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:1f:a0:fa:a7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.16.1/20 brd 192.168.31.255 scope global br-53f561d9bc4a
       valid_lft forever preferred_lft forever
    inet6 fe80::42:1fff:fea0:faa7/64 scope link 
       valid_lft forever preferred_lft forever
285: veth257b573@if284: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-53f561d9bc4a state UP group default 
    link/ether 9a:fb:d5:4a:03:e3 brd ff:ff:ff:ff:ff:ff link-netnsid 1
    inet6 fe80::98fb:d5ff:fe4a:3e3/64 scope link 
       valid_lft forever preferred_lft forever
297: veth3c75537@if296: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-53f561d9bc4a state UP group default 
    link/ether 62:6f:fb:00:02:b4 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::606f:fbff:fe00:2b4/64 scope link 
       valid_lft forever preferred_lft forever
299: veth56add30@if298: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-53f561d9bc4a state UP group default 
    link/ether 62:41:3a:f1:1b:f3 brd ff:ff:ff:ff:ff:ff link-netnsid 2
    inet6 fe80::6041:3aff:fef1:1bf3/64 scope link 
       valid_lft forever preferred_lft forever
303: veth95f0173@if302: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-53f561d9bc4a state UP group default 
    link/ether 3a:e0:df:e6:47:cb brd ff:ff:ff:ff:ff:ff link-netnsid 5
    inet6 fe80::38e0:dfff:fee6:47cb/64 scope link 
       valid_lft forever preferred_lft forever

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck Thanks! That confirms my suspicion.

Could you take a screenshot of the networking tab for your VPS? It includes the information needed to fix this (IPv6 gateway, subnet size).

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry Thank you very much for your confirmation!

Unfortunately, the language is Japanese.
This is my simple translation.

Prefix Length: 64
Gateway: 2400:8500:1801:414::1
DNS Server 1: 2400:8500:1801:430::11
DNS Server 2: 2400:8500:1801:430::12
MAC Address: 02:02:76:1b:1c:f3

Screenshot:
image

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck Thanks! I can read a bit of Japanese.

Change /etc/network/interfaces to:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 static
    address 2400:8500:1801:414:118:27:28:243/64
    gateway 2400:8500:1801:414::1
    autoconf 0
    accept_ra 0

And then restart the network (systemctl restart networking).

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry

I can read a bit of Japanese.

Wow! you can read.

Thank you very much for your kind instruction.

I modified and tried to restart, but I had an error with sudo systemctl restart networking as follows.

Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.

Here are the details.

$ systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
   Active: failed (Result: exit-code) since Sat 2019-06-15 14:46:03 JST; 1min 20s ago
     Docs: man:interfaces(5)
  Process: 332 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=0/SUCCESS)
  Process: 1089 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 1083 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm set
 Main PID: 1089 (code=exited, status=1/FAILURE)
$ journalctl -xe
Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
No journal files were opened due to insufficient permissions.

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck I think you need to run sudo journalctl -xe instead (or maybe sudo systemctl status networking.service).

That said, I'm can now access the website over IPv6.
EDIT: Not anymore.

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry Thanks. I did restart again about 16:11 and sudo journalctl -xe and had the following log. I masked some IP addresses. (the log time is JST not UTC)

https://scrapbox.io/api/code/nwtgck-host/gh-card-issue-2/journalctl-xe.txt

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck Thanks for hanging in there!

Try this instead in /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 static
    address 2400:8500:1801:414:118:27:28:243/64
    autoconf 0
    accept_ra 0

Then restart networking again.

Specifying the gateway is probably causing problems, because a gateway is already obtained using DHCP for IPv4 and an interface can only have one gateway,

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry I'm so sorry for the delay.

I replaced /etc/network/interfaces with the new one. But I have still the same problem.

$ sudo systemctl restart networking
sudo: unable to resolve host 118-27-28-243
Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.

The result of sudo journalctl -xe as follows.

https://scrapbox.io/api/code/nwtgck-host/gh-card-issue-2/journalctl-xe2.txt

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck No problem!

Try running sudo ip addr flush dev eth0 and see if it works afterwards.

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry You're very kind!

I'm running sudo ip addr flush dev eth0 for over 2 minutes. It never stop?

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

I got it. The whole network may be down. I can't access to https://gh-card.dev/. Don't worry about it. I'll recover it.

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

The server is alive now. I shut down and boot again.

I hoped rebooting can fix IPv6 problem. But I had the following result.

image

from gh-card.

tambry avatar tambry commented on May 18, 2024

@nwtgck Really sorry about it causing the network to go down. I had no idea it could happen.

Maybe DHCP interferes with static configuration. Let's try configuring both IPv4 and IPv6 statically.
Could you take a screenshot of the γƒγƒƒγƒˆγƒ•γƒΌγ‚― tab for IPv4?

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

@tambry Thank you very much for helping me so much.

Here is the IPv6 IPv4 screenshot.

image

from gh-card.

nwtgck avatar nwtgck commented on May 18, 2024

NOTE

I used this /etc/network/interfaces #2 (comment) again because I had the problem below when git pull.

ssh: Could not resolve hostname github.com: Temporary failure in name resolution

I think all name-resolving was down including nslookup.

But, It still supports IPv6.
image
(https://ipv6-test.com/validate.php)

from gh-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.