Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property ACF::$fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields.php on line 138

Deprecated: Creation of dynamic property acf_loop::$loops is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 28

Deprecated: Creation of dynamic property ACF::$loop is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 269

Deprecated: Creation of dynamic property ACF::$revisions is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/revisions.php on line 397

Deprecated: Creation of dynamic property acf_validation::$errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 28

Deprecated: Creation of dynamic property ACF::$validation is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 214

Deprecated: Creation of dynamic property acf_form_customizer::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 28

Deprecated: Creation of dynamic property acf_form_customizer::$preview_fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 29

Deprecated: Creation of dynamic property acf_form_customizer::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 30

Deprecated: Creation of dynamic property ACF::$form_front is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-front.php on line 598

Deprecated: Creation of dynamic property acf_form_widget::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 34

Deprecated: Creation of dynamic property acf_form_widget::$preview_reference is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 35

Deprecated: Creation of dynamic property acf_form_widget::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 36

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the all-in-one-wp-migration domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp_plugin/wp_plugin.php on line 23

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 54

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1539

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 828

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property acf_field_oembed::$width is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 31

Deprecated: Creation of dynamic property acf_field_oembed::$height is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 32

Deprecated: Creation of dynamic property acf_field_google_map::$default_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-google-map.php on line 33

Deprecated: Creation of dynamic property acf_field__group::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-group.php on line 31

Deprecated: Creation of dynamic property acf_field_clone::$cloning is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 34

Deprecated: Creation of dynamic property acf_field_clone::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 35

Deprecated: Creation of dynamic property jh_acf_field_table::$settings is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-table-field/class-jh-acf-field-table.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902
{"id":24338,"date":"2015-02-19T12:44:06","date_gmt":"2015-02-19T10:44:06","guid":{"rendered":"https:\/\/upcloud.com\/community\/tutorials\/attaching-new-ip-addresses"},"modified":"2015-02-19T12:44:06","modified_gmt":"2015-02-19T10:44:06","slug":"attaching-new-ip-addresses","status":"publish","type":"tutorial","link":"https:\/\/studiogo.tech\/upcloudold\/tutorial\/attaching-new-ip-addresses\/","title":{"rendered":"Attaching new IP addresses"},"content":{"rendered":"\n

It is possible to have up to five public IPv4 and IPv6 addresses per your UpCloud server.  You\u2019ll need to shut down your cloud server before making changes to the network interfaces. Afterwards, you can attach new IP addresses by logging into your UpCloud Control Panel<\/a> and going to your server settings and Network<\/em> tab.<\/p>\n\n\n\n

\n
Test hosting on UpCloud!<\/a><\/div>\n<\/div>\n\n\n\n

Attaching new addresses<\/h2>\n\n\n\n

While the server is powered down, add a new IP address by selecting the type of address you want, public IPv4 or IPv6, and clicking the Attach address<\/em> button.<\/p>\n\n\n\n

\"Server<\/figure>\n\n\n\n

You\u2019ll get a confirmation notification and the new address will then appear on the list.<\/p>\n\n\n\n

\"New<\/figure>\n\n\n\n

That\u2019s how easy it is to attach new IP addresses on UpCloud Control Panel. However, there are some operations that must be done at the OS level in order for the system to become aware of the changes. Check below for the operating system-specific instructions for your server.<\/p>\n\n\n\n

Ubuntu 22 and later<\/h2>\n\n\n\n

Connect to your Cloud Server. Once in, you\u2019ll need to add a new interface configuration. Since the release of Ubuntu 22, the OS has been using netplan which changes how the network interfaces are configured.<\/p>\n\n\n\n

First, check the new network interface name with the command below. The new interface will be the last on the list without an IP, eth3<\/tt> in the example below.<\/p>\n\n\n\n

ip addr<\/code><\/pre>\n\n\n\n
5: eth3<\/span>: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000\n    link\/ether 6e:d7:1b:bf:3b:cf brd ff:ff:ff:ff:ff:ff\n    altname enp0s5\n    altname ens5<\/pre>\n\n\n\n

Next, create a new network configuration file and add the following content. Make sure you name the interface correctly.<\/p>\n\n\n\n

sudo nano \/etc\/netplan\/60-eth3.yaml<\/code><\/pre>\n\n\n\n
network:\n    version: 2\n    renderer: networkd\n    ethernets:\n        eth3<\/span>:\n            dhcp4: true<\/code><\/pre>\n\n\n\n

If you are adding an IPv6, the syntax is a little different, use the following instead.<\/p>\n\n\n\n

network:\n    version: 2\n    renderer: networkd\n    ethernets:\n        eth3<\/span>:\n            dhcp6: true<\/code><\/pre>\n\n\n\n

Then save the file and exit the editor.<\/p>\n\n\n\n

Lastly, apply the changes.<\/p>\n\n\n\n

sudo netplan apply<\/code><\/pre>\n\n\n\n

If the changes were applied successfully, you should now be able to see the new IP address.<\/p>\n\n\n\n

ip addr show dev eth3<\/span><\/code><\/pre>\n\n\n\n
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000\n    link\/ether 6e:d7:1b:bf:3b:cf brd ff:ff:ff:ff:ff:ff\n    altname enp0s5\n    altname ens5\n    inet 94.237.59.222\/22 metric 100 brd 94.237.59.255 scope global dynamic eth2\n       valid_lft 86396sec preferred_lft 86396sec\n    inet6 fe80::6cd7:1bff:febf:3bcf\/64 scope link \n       valid_lft forever preferred_lft forever<\/pre>\n\n\n\n

Once you see the new interface at the end of the list like in the example above you\u2019ve successfully configured a new IP address to your Cloud Server. It can now be used to connect to the host just like the other addresses.<\/p>\n\n\n\n

Debian and Ubuntu 20 or earlier<\/h2>\n\n\n\n

Connect to your Cloud Server. Once in, you\u2019ll need to add a new interface configuration to the \/etc\/network\/interfaces<\/tt> file. Open it for editing with elevated privileges.<\/p>\n\n\n\n

sudo nano \/etc\/network\/interfaces<\/code><\/pre>\n\n\n\n

Then enter one of the examples underneath the end of the file. The number of the network interface needs to be unique, set it to one larger than the previous one. If you haven\u2019t added addresses before it should be eth3<\/em> like in the example here.<\/p>\n\n\n\n

auto eth3\niface eth3 inet dhcp<\/code><\/pre>\n\n\n\n

In the case of IPv6 the syntax is a little different, use the following instead.<\/p>\n\n\n\n

auto eth3\niface eth3 inet6 auto<\/code><\/pre>\n\n\n\n

Then save the file and exit the editor.<\/p>\n\n\n\n

Afterwards, you\u2019ll need to restart the network to have the changes take effect.<\/p>\n\n\n\n

sudo systemctl restart networking<\/code><\/pre>\n\n\n\n

Check that the new interface appears and shows the correct new IP address with the following command.<\/p>\n\n\n\n

ip addr<\/code><\/pre>\n\n\n\n

If the IP addresses are not working after this, add the following lines to \/etc\/sysctl.conf<\/tt>:<\/p>\n\n\n\n

sudo nano \/etc\/sysctl.conf<\/code><\/pre>\n\n\n\n
net.ipv4.conf.all.rp_filter=0\nnet.ipv4.conf.default.rp_filter=0\nnet.ipv4.ip_forward = 1<\/code><\/pre>\n\n\n\n

On Ubuntu, you might also need to add the following to the specific new network interface and replace the number on the lines as appropriate.<\/p>\n\n\n\n

net.ipv4.conf.eth3<\/span>.rp_filter = 2\nnet.ipv4.conf.eth3<\/span>.arp_filter = 1<\/pre>\n\n\n\n

Once you\u2019ve saved the sysctl.conf<\/tt>, update the system status.<\/p>\n\n\n\n

sudo sysctl -p<\/code><\/pre>\n\n\n\n

Then restart the network using the same command as above and check the IP addresses again.<\/p>\n\n\n\n

sudo systemctl restart networking<\/code><\/pre>\n\n\n\n
ip addr<\/code><\/pre>\n\n\n\n
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n    link\/ether 6e:d7:1b:bf:63:c8 brd ff:ff:ff:ff:ff:ff\n    inet 185.26.50.223\/22 brd 185.26.51.255 scope global eth3\n       valid_lft forever preferred_lft forever\n    inet6 fe80::6cd7:1bff:febf:63c8\/64 scope link\n       valid_lft forever preferred_lft forever<\/pre>\n\n\n\n

Once you see the new interface at the end of the list like in the example above you\u2019ve successfully configured a new IP address to your Cloud Server. It can now be used to connect to the host just like the other addresses.<\/p>\n\n\n\n

If you have problems reaching one of the IP addresses with ping<\/tt>, for example, try rebooting the server and testing the connection again.<\/p>\n\n\n\n

sudo reboot<\/code><\/pre>\n\n\n\n

Also, make sure your firewall settings allow connecting to the new IP address as well.<\/p>\n\n\n\n

CentOS<\/h2>\n\n\n\n

You\u2019ll need to create a new network interface configuration file in the \/etc\/sysconfig\/network-scripts<\/tt> folder. Copy one of the pre-existing files to have a starting point, for example, the ifcfg-eth0<\/span><\/tt> to ifcfg-eth3<\/span><\/tt> with the following command.<\/p>\n\n\n\n

sudo cp \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/span> \/etc\/sysconfig\/network-scripts\/ifcfg-eth3<\/span><\/code><\/pre>\n\n\n\n

Then open the new file and change it to suit the new interface. Replace the device number on the first line with a new higher number. Commonly it would be eth3<\/tt> like in the example below if this is the first address you are adding after deploying the cloud server.<\/p>\n\n\n\n

DEVICE=eth3\nBOOTPROTO=dhcp\nONBOOT=yes<\/code><\/pre>\n\n\n\n

If you are attaching an IPv6 address, you can copy the existing IPv6 configuration.<\/p>\n\n\n\n

sudo cp \/etc\/sysconfig\/network-scripts\/ifcfg-eth2<\/span> \/etc\/sysconfig\/network-scripts\/ifcfg-eth3<\/span><\/code><\/pre>\n\n\n\n

Then change the device name, for example as below.<\/p>\n\n\n\n

DEVICE=eth3\nNM_CONTROLLED=no\nIPV6INIT=yes<\/code><\/pre>\n\n\n\n

Check your \/etc\/sysctl.conf<\/tt>, and make sure the default rp_filter<\/tt> is set to 0.<\/p>\n\n\n\n

sudo sysctl -a | grep default.rp_filter<\/code><\/pre>\n\n\n\n

If not, open the file to edit and add the parameter to the end of the file.<\/p>\n\n\n\n

net.ipv4.conf.default.rp_filter = 0<\/code><\/pre>\n\n\n\n

If you made changes to the sysctl.conf<\/tt>, update the system.<\/p>\n\n\n\n

sudo sysctl -p<\/code><\/pre>\n\n\n\n

Use the following command after you have done these operations to restart the network.<\/p>\n\n\n\n

sudo systemctl restart network<\/code><\/pre>\n\n\n\n

Then check the IP configuration.<\/p>\n\n\n\n

ip addr<\/code><\/pre>\n\n\n\n
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\n    link\/ether 6e:d7:1b:bf:49:64 brd ff:ff:ff:ff:ff:ff\n    inet 185.20.138.90\/22 brd 185.20.139.255 scope global dynamic eth3\n       valid_lft 86189sec preferred_lft 86189sec\n    inet6 fe80::6cd7:1bff:febf:4964\/64 scope link\n       valid_lft forever preferred_lft forever<\/pre>\n\n\n\n

When you see the new IP address in the command output it\u2019s connected and ready to use.<\/p>\n\n\n\n

If you have problems reaching one of the IP addresses with ping<\/tt>, for example, try rebooting the server and testing the connection again.<\/p>\n\n\n\n

sudo reboot<\/code><\/pre>\n\n\n\n

Also, make sure your firewall settings allow connecting to the new IP address as well.<\/p>\n\n\n\n

Windows<\/h2>\n\n\n\n

New network interfaces for IPv4 addresses should show up automatically without manual configuration.<\/p>\n\n\n\n

In the case of IPv6, you will need to run a couple of commands via Command Prompt<\/em> with Administrator privilege. Open the program by typing cmd<\/em> in the Run window and press enter, then copy in the commands below.<\/p>\n\n\n\n

netsh interface ipv6 set global randomizeidentifiers=disabled store=active \nnetsh interface ipv6 set global randomizeidentifiers=disabled store=persistent \nnetsh interface ipv6 set privacy state=disabled store=active \nnetsh interface ipv6 set privacy state=disabled store=persistent<\/code><\/pre>\n\n\n\n

Afterwards, you should restart the new network interface by disabling and re-enabling it at the Network Connections window.<\/p>\n\n\n\n

Note that the Windows Server firewall blocks ICMP requests by default. If you want to test the new interface with ping, open the firewall settings with wf.msc<\/tt> in the run window. Find the ICMPv4 and ICMPv6 protocols in the Inbound Rules and enable the ones you need.<\/p>\n\n\n\n

Other options<\/h2>\n\n\n\n

It\u2019s also possible to manually set additional public IPv4 addresses to the primary interface, for example creating aliases like eth0:1, and eth0:2 on Linux, by using static configuration. Currently, this is not supported with IPv6 addresses. You can find instructions for setting up alias addresses in our articles for configuring floating IPs on CentOS<\/a>, Debian<\/a>, Ubuntu<\/a> or Windows<\/a>.<\/p>\n","protected":false},"featured_media":27207,"comment_status":"open","ping_status":"closed","template":"","community-category":[108,109,111],"class_list":["post-24338","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry","community-category-quick-start","community-category-upcloud-services","community-category-networking"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/types\/tutorial"}],"replies":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/comments?post=24338"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/27207"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24338"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}