LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-26-2015, 11:55 PM   #1
lindylex
Member
 
Registered: Mar 2007
Posts: 192

Rep: Reputation: 17
ssh can not connect when I initialized bridge-utils on remote computer


I have a computer I ssh into. This computer hosts a Openvpn setup I am still trying to get to work.


When I issue the command

# brctl addif br0 eth0

It knock me off ssh. I have read that ssh searches for the eth0 on connection and this is a common problem with bridging and ssh not working.

What is my solution? I tried various iptables commands such as.

# iptables -A INPUT -p tcp --dport 22 -m physdev --physdev-in eth0 -j ACCEPT

This did nothing.

Thansk
 
Old 10-27-2015, 04:12 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Check on which interfaces ssh is listening.
Also try to disable iptables for the beeing and reactivate once you have it working with bridge.
Did you assign an ip to br0? Did you clear the ip of eth0?
 
Old 10-28-2015, 02:28 PM   #3
lindylex
Member
 
Registered: Mar 2007
Posts: 192

Original Poster
Rep: Reputation: 17
Zhjim, this is what the server looks like after I create the bridge. Things do not work in this state.

br0 Link encap:Ethernet HWaddr 00:06:5b:2a:11:de
inet addr:192.168.2.27 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::206:5bff:fe2a:11de/64 Scope:Link
inet6 addr: 2601:41:4102:c0c0:206:5bff:fe2a:11de/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2350 (2.2 KiB) TX bytes:1516 (1.4 KiB)

eth0 Link encap:Ethernet HWaddr 00:06:5b:2a:11:de
inet6 addr: fe80::206:5bff:fe2a:11de/64 Scope:Link
inet6 addr: 2601:41:4102:c0c0:206:5bff:fe2a:11de/64 Scope:Global
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:1322 errors:0 dropped:0 overruns:0 frame:0
TX packets:1420 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:189614 (185.1 KiB) TX bytes:254913 (248.9 KiB)
Interrupt:11 Base address:0xac00

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:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)

tap0 Link encap:Ethernet HWaddr ce:c0:a2:cb:87:ca
UP BROADCAST PROMISC 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:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

ON SERVER

# ip addr ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UNKNOWN group default qlen 1000
link/ether 00:06:5b:2a:11:de brd ff:ff:ff:ff:ff:ff
inet6 2601:41:4102:c0c0:206:5bff:fe2a:11de/64 scope global mngtmpaddr dynamic
valid_lft 270318sec preferred_lft 270318sec
inet6 fe80::206:5bff:fe2a:11de/64 scope link
valid_lft forever preferred_lft forever
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast master br0 state DOWN group default qlen 100
link/ether ce:c0:a2:cb:87:ca brd ff:ff:ff:ff:ff:ff
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 00:06:5b:2a:11:de brd ff:ff:ff:ff:ff:ff
inet 192.168.2.27/24 brd 192.168.2.255 scope global br0
valid_lft forever preferred_lft forever
inet6 2601:41:4102:c0c0:206:5bff:fe2a:11de/64 scope global mngtmpaddr dynamic
valid_lft 270498sec preferred_lft 270498sec
inet6 fe80::206:5bff:fe2a:11de/64 scope link
valid_lft forever preferred_lft forever


ON SERVER


# ip ro ls
192.168.2.0/24 dev br0 proto kernel scope link src 192.168.2.27


"Check on which interfaces ssh is listening." how do I do this?

Check on which interfaces ssh is listening.
 
Old 10-28-2015, 03:10 PM   #4
lindylex
Member
 
Registered: Mar 2007
Posts: 192

Original Poster
Rep: Reputation: 17
SOLUTION SOLVED:

Running the following command on the server after creating the bridge solved my inability to log in using ssh.

ip route add default via 192.168.2.1 dev br0


This "192.168.2.1" must be the router's ip address that the server is directly connected to.

The solution came from Freenode IRC server channel #openssh user: BasketCase.
 
Old 10-29-2015, 02:47 AM   #5
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Good job!

Please mark the thread as solved. (Use the "Thread Tools" button on top of page.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't connect to SSH server on a VirtualBox VM (bridge mode) yzT! Linux - Networking 2 03-03-2014 11:59 AM
[SOLVED] using ssh on remote computer to connect to home computer behind two routers Volofrog Linux - Networking 8 12-25-2012 03:02 PM
Configuring SSH on Ubuntu to connect to remote computer guitarman Linux - Networking 14 11-06-2012 07:07 AM
Remote login with SSH, but display on remote computer. brodin Linux - Software 3 09-09-2007 03:01 AM
Bridge Utils help! kenneth_phough Linux - Networking 0 04-13-2006 11:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration