Phone sales support +39 0575 05077
  Phone technical support +39 0575 0508
 
Cloud Server > 10 - Public IP > How to make connections configured in Linux Debian and Ubuntu servers effective

10.1.6 How to make connections configured in Linux Debian and Ubuntu servers effective Cloud Server Pro service guide

To be able to make the association created between the Public IP and Cloud Server effective you have to configure the network card with the parameters provided when the Public IP was created.  These data can be recovered from the control panel in the window with the details of the Public IP:
  1. Select the tab "Manage" in the control panel and click the menu item "Public IP" on the left
  2. When hen the summary screen for all the public IPs opens, click on the "Details" button in the line of the IP whose configuration parameters you want to find out

Once you have taken note of the data, access the Cloud Server via the Recovery Console. You can configure the network card in Linux Debian either temporarily (until the next reboot), or permanently.
To configure the card temporarily, for diagnostic purposes or to check or test its functionality, proceed as follows:

  1. Launch from command line ifconfig thus ifconfig <interface> <ip_address>  netmask <netmask> where in the order: <interface> is the card that you want to configure (eth0 eth1 eth2), <ip_address> is the Public IP address that you want to associate, <netmask> is the relevant subnet mask. (e.g. launching ifconfig eth2 95.110.153.24 netmask 255.255.255.0 will be configured with the IP "95.110.153.24" and the subnet mask "255.255.255.0")
  2. Launch from the command line "route" thus composed route add default gw <gateway> where <gateway> is the IP address for the gateway. (e.g. by launching route add default gw 95.110.153.1 the default gateway will be set with the IP "95.110.153.1")
  3. Launch from command line ifconfig <interface> to check that the card has been configured correctly (e.g. ifconfig eth2 to check the new setting on the card eth2)
  4. Launch from command line route to check the gateway setting for the IP
To configure the network interface permanently, proceed as follows:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 95.110.153.24
netmask 255.255.255.0
gateway 95.110.153.1
dns-nameservers 8.8.8.8   8.8.4.4

  1. Launch from command line nano /etc/network/interfaces to edit the configuration file
  2. Edit the file by entering the data for the IP previously recorded for the network card that you want to configure. Remember that to move around inside the text file you can use the arrows and to enter the new text just add it below to the existing rows (in the example you are configuring the network card eth0 with the public IP 95.110.153.24 with netmask 255.255.255.0 and gateway 95.110.153.1)
  3. Once you have finished entering your data press "CTRL+O" to save the changes and then "CTRL+X" to exit the editor.
At this point the Cloud Server is correctly connected to the Internet and can be accessed from the Internet via the public IP configured.
See also
Recovery Console