Configure um IP estático alocado para o servidor dedicado

1

Então, eu comprei um novo IP para meu servidor dedicado de um revendedor da Psychz Networks. Esta é a única informação que eles me deram:

IP: 104.206.231.109
Gateway: 104.206.231.1
Netmask: 255.255.255.128

Então, eu configurei meu arquivo de Interfaces assim:

# 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

# The primary network interface
auto p4p1
iface p4p1 inet dhcp
iface eth0 inet static
address 104.206.231.109
netmask 255.255.255.128
gateway 104.206.231.1

... annnd eu corri

 services networking restart

e obtivemos:

 stop: Job failed while stopping
 start: Job is already running: networking

Ah, e meu resolv.conf:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
search dal.us.mpgs.system

Ah, e aqui está ifconfig

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:27306645 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27306645 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2978675193 (2.9 GB)  TX bytes:2978675193 (2.9 GB)

p4p1      Link encap:Ethernet  HWaddr 00:25:90:76:c3:ba
          inet addr:104.206.231.47  Bcast:104.206.231.63  Mask:255.255.255.192
          inet6 addr: fe80::225:90ff:fe76:c3ba/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18388696 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13534048 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6282692826 (6.2 GB)  TX bytes:2823775361 (2.8 GB)
          Interrupt:16 Memory:fb900000-fb920000

Como posso consertar isso? Eu tenho tudo configurado corretamente, tanto quanto eu posso ver.

    
por Airee 28.06.2016 / 17:04

1 resposta

1

De acordo com o seu ifconfig , sua interface relevante é p4p1 . Sugiro que você altere seu arquivo /etc/network/interfaces para ler:

# 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

# The primary network interface
auto p4p1
iface p4p1 inet static
address 104.206.231.109
netmask 255.255.255.128
gateway 104.206.231.1
dns-nameservers 8.8.8.8 104.206.231.1

Reinicie a interface:

sudo ifdown p4p1 && sudo ifup p4p1

Você conseguiu o endereço desejado?

ifconfig

Você pode acessar a internet?

ping -c3 www.ubuntu.com

Se você obtiver o endereço desejado e o ping retornar, tudo estará definido.

    
por chili555 28.06.2016 / 17:24