3

I have a ubuntu box setup with two NICs. I can bridge them together just fine, but I haven't been able to setup a way to SSH into the box once the connections are bridged together. Here's my /etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet manual

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
    address 192.168.33.213
    netmask 255.255.255.0
    gateway 192.168.33.1
    bridge_ports eth0 eth1
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

This works just fine for bridging, but I'm not able to SSH into the box. I tried setting up another interface on one of the NICs:

auto eth0:1
iface eth0:1 inet static
    address 192.168.33.215
    netmask 255.255.255.0
    gateway 192.168.33.1

But this really didn't help. Is it possible to ssh into a machine that has all of its NICs bridged? If it is, how?

1
  • Can you ping the 192.168.33.213 address? What is the output of netstat -ntlp? You really shouldn't be using the dev:n syntax to add additional addresses, it is being deprecated.
    – Zoredache
    Mar 30, 2012 at 7:34

1 Answer 1

3

You ssh daemon should be listening on all interfaces (*:ssh). Check /etc/sshd_config and verify that there isn't some other ListenAddress statement in there.

In case that doesn't work, try adding that last line to the brctl block.

     bridge_stp off
     bridge_fd 0
     bridge_maxwait 0
     up /etc/init.d/ssh restart

If you're still bound up, I'd start blaming your routing table and investigating that.

2
  • restarting the service worked ('sudo service ssh restart' also works in the newer versions of Ubuntu). Thanks!
    – squinlan
    Mar 30, 2012 at 20:47
  • also the extra interface isn't needed. sshd can listen on the bridge interface (br0 in this case) if it has an ip assigned.
    – squinlan
    Mar 30, 2012 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .