natvps.net - ipv6 + Alpine trouble

edited January 3 in Help

Can't ping default ipv6 gw from the Alpine Linux instance.

Should it be working out of the box?

kvm USA

Comments

  • AuroraZeroAuroraZero ModeratorHosting ProviderRetired

    @vict0r said:
    Can't ping default ipv6 gw from the Alpine Linux instance.

    Should it be working out of the box?

    kvm USA

    Setup the network manually and see if it works.

    Thanked by (1)yoursunny

    Free Hosting at YetiNode | Cryptid Security | URL Shortener | LaunchVPS | ExtraVM | Host-C | In the Node, or Out of the Loop?

  • @AuroraZero said:

    @vict0r said:
    Can't ping default ipv6 gw from the Alpine Linux instance.

    Should it be working out of the box?

    kvm USA

    Setup the network manually and see if it works.

    This is correct, I learned this the hard way. @vict0r I assume you got a NAT vps and have yet to configure IPV6 other than just seeing it assigned in the network tab on VPS Control panel. Let us know with details if otherwise.

    Insert signature here, $5 tip required

  • edited January 3

    Yes it's a NAT vps. Their Debian and CentOS images does set it up with working ipv6 connectivity.

    So far I've done something like:

    ip -6 addr flush dev eth0
    ip -6 neigh flush dev eth0
    ip -6 route flush dev eth0
    ip -6 addr add [mystaticipaddressasprovidedinthecontrolpanel] dev eth0
    ip -6 route add default via [gwaddressasprovidedsomewhere] dev eth0

    Probably not correct. Please help.

  • AuroraZeroAuroraZero ModeratorHosting ProviderRetired

    1. Check IPv6 Availability

    Ensure your server's network interface supports IPv6. Use:

    ip -6 addr
    

    If IPv6 is enabled, you’ll see an output listing IPv6 addresses.

    2. Locate the Network Interface

    Identify your network interface (e.g., eth0, ens33, etc.):

    ip link show
    

    3. Edit the Network Configuration File

    The configuration files are located in /etc/sysconfig/network-scripts/.
    Open the file for your network interface, e.g., ifcfg-eth0:

    sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
    

    4. Add IPv6 Settings

    Append or modify the following lines with your IPv6 details:

    IPV6INIT=yes
    IPV6ADDR=your_ipv6_address/prefix
    IPV6_DEFAULTGW=your_ipv6_gateway
    

    Replace your_ipv6_address with your assigned IPv6 address and your_ipv6_gateway with the gateway.

    5. Restart the Network Service

    Save the file and restart the network service to apply changes:

    sudo systemctl restart network
    

    6. Verify IPv6 Configuration

    Check if the IPv6 address is assigned to your interface:

    ip -6 addr show
    

    Ping an IPv6 address to ensure connectivity:

    ping6 google.com
    

    7. Enable IPv6 Permanently (Optional)

    If IPv6 is disabled globally, enable it in /etc/sysctl.conf or /etc/sysctl.d/99-sysctl.conf:

    net.ipv6.conf.all.disable_ipv6 = 0
    net.ipv6.conf.default.disable_ipv6 = 0
    

    Apply changes:

    sudo sysctl -p
    
    Thanked by (1)DrNutella

    Free Hosting at YetiNode | Cryptid Security | URL Shortener | LaunchVPS | ExtraVM | Host-C | In the Node, or Out of the Loop?

  • skorousskorous OGSenpai

    @vict0r said:
    Yes it's a NAT vps. Their Debian and CentOS images does set it up with working ipv6 connectivity.

    So far I've done something like:

    ip -6 addr flush dev eth0
    ip -6 neigh flush dev eth0
    ip -6 route flush dev eth0
    ip -6 addr add [mystaticipaddressasprovidedinthecontrolpanel] dev eth0
    ip -6 route add default via [gwaddressasprovidedsomewhere] dev eth0

    Probably not correct. Please help.

    Yeah, my first question would be "Do you know it's eth0?" That's less common now than it used to be.

  • AuroraZeroAuroraZero ModeratorHosting ProviderRetired

    @skorous said:

    @vict0r said:
    Yes it's a NAT vps. Their Debian and CentOS images does set it up with working ipv6 connectivity.

    So far I've done something like:

    ip -6 addr flush dev eth0
    ip -6 neigh flush dev eth0
    ip -6 route flush dev eth0
    ip -6 addr add [mystaticipaddressasprovidedinthecontrolpanel] dev eth0
    ip -6 route add default via [gwaddressasprovidedsomewhere] dev eth0

    Probably not correct. Please help.

    Yeah, my first question would be "Do you know it's eth0?" That's less common now than it used to be.

    KVM chances are high but you are correct best to check.

    Free Hosting at YetiNode | Cryptid Security | URL Shortener | LaunchVPS | ExtraVM | Host-C | In the Node, or Out of the Loop?

  • edited January 3

    Here is my network configuration on natvps.net with alpine linux, you need to change the IP to yours:

    wh-us:~$  cat /etc/network/interfaces 
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
        address 192.168.100.10
        netmask 255.255.255.0
        gateway 192.168.100.1
        dns-nameservers 8.8.4.4 1.0.0.1
    
    iface eth0 inet6 static
        address 2a00:5000:60::b/80
        gateway 2a00:5000::2
        pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra
    

    By the way, IPv6 doesn't work from time to time on Canada node, but I don't bother to open a ticket and just don't renew it.

    MicroLXC is lovable. Uptime of C1V

  • Thank you.

    It is now working.

    The cloud init script in the Alpine Linux image does not set:
    pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra

    That was the culprit.

Sign In or Register to comment.