Results 1 to 4 of 4

Thread: Multi Homed local / internet setup

  1. #1
    Join Date
    Aug 2008
    Beans
    32

    Multi Homed local / internet setup

    I've got a Ubuntu box with two network cards, the box is running motion to capture images from my ip security camera. I've realised that the traffic from this camera is swamping my network so I'd like to make my ubuntu box multihomed and have the ip camera connected directly to the ubuntu box.

    I've tried setting this up using this /etc/network/interfaces file:

    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address 192.168.1.5
    netmask 255.255.255.0
    gateway 192.168.1.1

    auto eth1
    iface eth1 inet static
    address 192.168.2.5
    netmask 255.255.255.0
    gateway 192.168.2.1

    eth1 is the one connected directly to the camera and the camera has an ip address of 192.168.2.55

    My problem is that I can ping and ssh to the ubuntu box at 192.1681.5 but it won't connect to the internet. It looks like the traffic is trying to use the 192.168.2.1 gateway which doesn't exist.

    I fixed it using this:
    ip route add default via 192.168.1.1

    But now I have to type that in after ever restart, how do I make this setting stick?

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Multi Homed local / internet setup

    Remove the "gateway" directive for eth1.

  3. #3
    pricetech is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Apr 2008
    Beans
    1,651

    Re: Multi Homed local / internet setup

    Yes, remove the Gateway entry from your ETH1. More than one gateway entry, even if both exist, creates problems with access outside the subnet.

  4. #4
    Join Date
    Aug 2008
    Beans
    32

    Re: Multi Homed local / internet setup

    Thanks for the replies, that fixed it for me.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •