2

My system: Ubuntu 16.04 server, Nginx 1.10, PHP 7. I have IPv6 address only for my VPS. Please write good links or info for setting IPv6.

For IPv4:

address 188.225.32.215
netmask 255.255.255.255
gateway 188.225.32.1

For IPv6:

address 2a03:6f00:4::bce1:224d
netmask 64
gateway 2a03:6f00:4::1

ifconfig:

--------------------------------
eth0      Link encap:Ethernet  HWaddr 8a:cf:f5:f9:78:c7
          inet addr:188.275.37.215  Bcast:188.275.37.255  Mask:255.255.255.0
          inet6 addr: fe80::88cf:f5ff:fef9:78c7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:37797386 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1856762239 (1.8 GB)  TX bytes:47193912 (47.1 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:196 (196.0 B)  TX bytes:196 (196.0 B)
--------------------------------

/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
--------------------------------

/etc/network/interfaces.d - empty.

0

1 Answer 1

8

Provided information (in readable formats):

IPv4:
(Pending or not provided)

IPv6:
Address: 2a03:6f00:4::bce1:224d
Network mask: /64
Gateway: 2a03:6f00:4::1

These assumptions were added by the answerer, because these are not provided by OP:
DNS Nameservers (Google DNS, IPv4): 8.8.8.8, 8.8.4.4
DNS Nameservers (Google DNS, IPv6): 2001:4860:4860::8888, 2001:4860:4860::8844

Taking this from one of my other VPSes, not necessarily from the same provider, I am going to be using my /etc/network/interfaces as a guide. You will need to reboot your VPS after these settings are changed.

Using this page on Debian wiki as a guide (which works for Ubuntu in most cases), and your information from your VPS provider, something like this is what you're going to be looking to have 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 2a03:6f00:4::bce1:224d
    netmask 64
    gateway 2a03:6f00:4::1
    dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844

Once rebooted, you should have IPv6 then mapped to your system and usable. You can try and test this by running ping6 2001:4860:4860::8888 to make sure you can go out to the 'net on v6; if it returns pings and doesn't error out, then you should be ready-to-go. Otherwise, we'll have to do some complex debugging.

7
  • @SergeyEremin I've updated my answer, and this may or may not work well for you out of the box; we'll have to see. Ideally you'll set up IPv4 in static mode as well, but since I don't have your IPv4 data, I'm making assumptions. (Your information was not easily identifiable in your edits, thank you for providing this information here in a comment, I've copied it into the answer in a more human-understandable form). I will clean up the rest of the comments now.
    – Thomas Ward
    Jan 25, 2017 at 15:25
  • Thank you! Write please, what info need for ipv4 or make new question? Are you sure what need "dns-nameservers" line? I found manual without "dns-nameservers". I have the native question.
    – Sylon
    Jan 25, 2017 at 16:04
  • @SergeyEremin IPv4 address, IPv4 gateway, IPv4 netmask, same as the IPv6 stuff that I needed; I'd put that in and use Google nameservers, personally, and I would be happy to update this as well with that info. (DHCP is fine, but static is better, assuming that your IPv4 never changes)
    – Thomas Ward
    Jan 25, 2017 at 16:09
  • Yep, I have static address ipv4, ipv6. I will ask information at provider, that is not enough to answer. Thanks for the link to the tutorial. It was a challenge I was looking for its Ubuntu, but it was necessary to look for Debian.
    – Sylon
    Jan 25, 2017 at 16:22
  • @SergeyEremin Most people deploying Server edition know what they're doing or use DHCP and not static; that said, VPSes aren't as kind, sometimes, so it really depends on the VPS provider whether they code that information automatically into the config or not. In my case, I know how to do it, and at my VPSes I always manually install myself, and not use default images, so... I always configure manually :)
    – Thomas Ward
    Jan 25, 2017 at 16:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .