2 ip setup?

Discussion in 'Server Operation' started by Kev King, Jul 1, 2008.

  1. Kev King

    Kev King New Member

    :confused:

    I am running a Debian etch server, has been working relatively ok, on one IP address.

    Have the option of a second IP address. Only problem is, everytime I enable the second address, the server goes down after a short while. I suspect firewall or intrusion to be the problem.

    How do i secure the second ip like the first one.

    Want to set up something like:

    eth0 (net) external connection
    eth1 (loc) internal.

    Have tried looking at ssh setup, but there is no hostname or ip to set or configure for each address?

    There is no entries in hosts.allow or hosts.deny would this cause a problem?

    Would greatly appreciate any help or guidance.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your logs?
    What's in /etc/network/interfaces?
    What's the output of
    Code:
    ifconfig
    ?
     
  3. Kev King

    Kev King New Member

    Thankyou falko for your reply.

    What error logs am I looking for?

    output of /etc/network/interfaces:

    # 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 eth0
    iface eth0 inet static
    address 85.17.138.15
    netmask 255.255.255.128
    network 85.17.138.0
    broadcast 85.17.138.127
    gateway 85.17.138.126

    auto eth1
    iface eth1 inet static
    address 85.17.138.62
    netmask 255.255.255.128
    network 85.17.138.0
    broadcast 85.17.138.127
    gateway 85.17.138.126

    auto eth0:1
    iface eth0:1 inet static
    address 85.17.138.62
    netmask 255.255.255.128

    output of ifconfig:

    ifconfig
    eth0 Link encap:Ethernet HWaddr 00:1D:92:46:FD:84
    inet addr:85.17.138.15 Bcast:85.17.138.127 Mask:255.255.255.128
    inet6 addr: fe80::21d:92ff:fe46:fd84/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:10922 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3140 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:1362087 (1.2 MiB) TX bytes:506235 (494.3 KiB)
    Base address:0xdf00 Memory:fdee0000-fdf00000

    eth0:1 Link encap:Ethernet HWaddr 00:1D:92:46:FD:84
    inet addr:85.17.138.62 Bcast:85.17.138.127 Mask:255.255.255.128
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    Base address:0xdf00 Memory:fdee0000-fdf00000

    eth1 Link encap:Ethernet HWaddr 00:1D:92:46:FD:85
    inet addr:85.17.138.62 Bcast:85.17.138.127 Mask:255.255.255.128
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
    Base address:0xcf00 Memory:fdce0000-fdd00000

    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:16436 Metric:1
    RX packets:3190 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3190 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:305452 (298.2 KiB) TX bytes:305452 (298.2 KiB)
     
  4. falko

    falko Super Moderator Howtoforge Staff

    eth1 and eth0:1 are both using the same IP address. This cannot work.

    also, make sure that your network settings (subnetmask, broadcast, etc.) are correct. This link might help you: www.subnetmask.info
     

Share This Page