Page MenuHomeMiraheze
Paste P264

OVH IPv6 Setup
ActivePublic

Authored by Paladox on Feb 7 2020, 18:03.
Referenced Files
F1119449: raw.txt
Feb 8 2020, 21:06
F1119436: raw.txt
Feb 8 2020, 20:17
F1119222: raw.txt
Feb 8 2020, 04:41
F1119208: raw.txt
Feb 8 2020, 03:37
F1119066: raw.txt
Feb 7 2020, 18:03
Subscribers
None
IPV6 setup:
1. Go to https://ca.ovh.com/manager/#/configuration/ip?tab=ip
2. Select the host you want to configure the ipv6 address for, from the dropdown.
3. You should see a ipv6 looking address in the list
4. Click on it to expand the list
5. Copy the ipv6 address for example `2001:41d0:800:1056::/64`, you can pick `2001:41d0:800:1056::1` and so on. (You must setup a dns entry for the cloud/vps in the miraheze/dns repo as the ipv6 address requires reverse (it checks that the dns exist)).
6. Now go back to `https://ca.ovh.com/manager/#/configuration/ip?tab=ip` site, click on “You can select an IPv6 from this block by clicking here.” and enter the ipv6 address you choose (make sure the dns is updated by running puppet on the nameserver hosts)
7. Now once that’s all finished, go to the cloud host first afterwards go to the vps.
8. Run `vi /etc/network/interfaces` and put the following.
Cloud setup + vps:
1. Install by changing Type Of OS to “Basic”
2. Select “Debian 10 "Buster" - debian10 (Linux)” from the list and proceed to install, make sure to select your ssh key.
3. When you get to the end, enter server name and select your ssh key from the drop down.
4. After server has come back up, login by doing `ssh debian@cloud[num].miraheze.org -i <key>`
5. Edit /etc/hosts and remove `127.0.1.1` section, then add <main_ip> cloud[num].miraheze.org cloud[num]
6. Edit /etc/cloud/cloud.cfg, changing manage_etc_hosts to false.
7. echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
8. wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
9. Run the following `apt update && apt full-upgrade`.
10. Run the following `apt install proxmox-ve postfix open-iscsi`
11. Empty /etc/network/interfaces.d/50-cloud-init.cfg and enter the following:
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback
dns-nameservers 213.186.33.99
auto eth0
iface eth0 inet dhcp
mtu 1500
12. echo “network: {config: disabled}” > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
13. Empty /etc/network/interfaces and insert the following
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
iface eno1 inet manual
# IPV4 main host addresse, replace address, broadcast and gateway with correct ip.
auto vmbr0
iface vmbr0 inet static
address 54.36.165.86
netmask 255.255.255.0
broadcast 54.36.165.255
gateway 54.36.165.254
bridge-ports eno1
bridge-stp off
bridge-fd 0
# IPV6 addresses are configured in the ipv6 setup above, use the ip you selected.
# Example below is for cloud1
iface vmbr0 inet6 static
address 2001:41d0:800:1056::1
netmask 128
gateway 2001:41D0:800:10FF:FF:FF:FF:FF
post-up /sbin/ip -f inet6 route add 2001:41D0:800:10FF:FF:FF:FF:FF dev vmbr0
post-up /sbin/ip -f inet6 route add default via 2001:41D0:800:10FF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del 2001:41D0:800:10FF:FF:FF:FF:FF dev vmbr0
pre-down /sbin/ip -f inet6 route del default via 2001:41D0:800:10FF:FF:FF:FF:FF
# Set this one last, so that cloud-init or user can
# override defaults.
source /etc/network/interfaces.d/*
13. Reboot the server.
14. Run `passwd root` and set the password, make sure it is secure.
15. Run the following `cd /var/lib/vz/template/iso ; wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.2.0-amd64-netinst.iso`
16. Run the following `ssh -L 8006:127.0.0.1:8006 <user>@<cloud_host>.miraheze.org`
17. Go to https://localhost:8006 (and accept the invalid certificate as connection will be secure due to ssh) and login using your account and password.
18. Create a vm using the UI (make sure after the vm is created, to change the vmac for the network adapter to match that of the fallover ip you want to use (done in ovh ui), you can refer to the ipv6 doc above which some of it will be relevant to doing this).
19. Once VM is setup, click start and go through the installation, when you get onto the network step enter the following (ip is different per vm): `51.77.107.210` for address, `51.77.107.254` for gateway (note the ips should be different, and should be the fallover ips configured in OVH UI) Note that the gate way is the fallover ip, so for example 51.77.107.210 becomes 51.77.107.254.
20. Once vps is started (you may have to change the ordering so that booting disk is first), edit /etc/ssh/sshd_config changing PermitRootLogin to yes. Restart ssh afterwards (`service ssh restart`).
21. Run `ssh root@<vps_fall_over_ip_you_configured_for_address>`.
22. Empty /etc/network/interfaces and insert the following in it (doin’t forget to change the ipv4/ipv6 address, the example shown is for cp6):
# 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
allow-hotplug ens18
auto ens18
iface ens18 inet static
address 51.77.107.210
gateway 51.77.107.254
netmask 255.255.255.0
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8 8.8.4.4
dns-search miraheze.org
iface ens18 inet6 static
address 2001:41d0:800:1056::2
netmask 64
post-up /sbin/ip -f inet6 route add 2001:41D0:800:10FF:FF:FF:FF:FF dev ens18
post-up /sbin/ip -f inet6 route add default via 2001:41D0:800:10FF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del default via 2001:41D0:800:10FF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del 2001:41D0:800:10FF:FF:FF:FF:FF dev ens18
And reboot the vps
Make sure you follow `IPV6 setup` above for this, replacing the above ip’s.
Install firewall on the cloud host:
1. apt-get install ufw
2. ufw allow ssh
3. sudo ufw default deny incoming
4. ufw enable
Steps for cluster:
2. sudo ufw allow from 54.36.165.90 to any port 5404:5405 proto udp
3. sudo ufw allow from 2001:41d0:800:105a::1 to any port 5404:5405 proto udp
Note example ip shown is for cloud2.

Event Timeline

RhinosF1 changed the title of this paste from untitled to OVH IPv6 Setup.Feb 8 2020, 06:58
RhinosF1 updated the paste's language from autodetect to text.