Public static IP configuration Ubuntu Server 14.04 LTS

Discussion in 'Installation/Configuration' started by Poliman, Feb 2, 2017.

  1. Poliman

    Poliman Member

    Hello everyone. I have a problem with configuration public static IP on my Ubuntu Server. I don't know what is wrong. I have 4 network interfaces from em1 to em4. I have connected em1 to LAN and em4 to WAN. Here is configuration in /etc/network/interfaces:
    # The primary network interface
    auto em1 em4
    iface em1 inet static
    #gateway #this is not needed if below is configured gateway, am I right?

    iface em4 inet static
    address 31.X.X.180
    network 31.X.X.176 #calculated from netmask and address
    gateway 31.X.X.177
    dns-nameservers 193.X.X.10 193.X.X.20

    Should I add some static routes or something? With this configuration I can't connect to the server from outside. Command 'route -n' in console gives output:
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface UG 0 0 0 em1
    31.X.X.176 U 0 0 0 em4 U 0 0 0 em1

Share This Page