How To Configure a Discovery Ubuntu Instance
When you install Ubuntu on the F2H Discovery network you must provide a route to the gateway or your instance will not have any access to the outside world. We already configure the correct IPv4 and IPv6 information but customers must tell the instance where to look for the internet. Doing so is simple and is done by using the NoVNC console in your client area.
Create A Service
We want this change to persist across reboots so we are going to configure a new service that will run each time your instance boot’s up. This service will run a simple bash script to provide a route to the gateway. Let’s start coding! Create the file /etc/systemd/system/f2h.service and add the below code.
nano /etc/systemd/system/f2h.service [Unit] After=cloud-init.service [Service] ExecStart=/F2H/routes.sh [Install] WantedBy=default.target
Save and close the file. Chmod the file to 644
chmod 664 /etc/systemd/system/f2h.service
Create Startup Script
Now we are going to create a folder to house our script that will run at startup. Inside the folder create the file routes.sh
mkdir /F2H nano /F2H/routes.sh
Inside the routes.sh file we enter our gateway information. We are going to add routes to the IPv4 and IPv6 gateway. This will allow both your IPv4 address and your IPv6 address to resolve from your NVMe VPS Server.
#!/bin/bash # IPv4 Gateway ip route add 10.10.10.1 dev eth0 ip route add default via 10.10.10.1 # IPv6 Gateway route add -A inet6 default gw 2001:41d0:xXx:xxff:ff:ff:ff:ff
Ensure you use the correct gateway information which is listed in your Instance control panel under IP Information. Save and close the file then, chmod to 744.
chmod 744 /F2H/routes.sh
Finally, you can reload the service and reboot the server. On reboot IPv4 and IPv6 will be working.
systemctl enable f2h.service
How was this article? – How To Configure a Discovery Ubuntu Instance
You might also like
More from Instance Management
How To Activate Root Login On Your Discovery Instance The root account is the most targeted account on a server. If …
How To Reset CentOS 7 Root Password Just like with other distributions, you can use the NoVNC console to reset …
How To Reset CentOS 8 Root Password - Discovery Instance Resetting the password in a CentOS 8 server is much the …