1

I am on EXSi and I have 2 instances: Ubuntu and CentOS. These are the network configurations

Ubuntu

eth0      Link encap:Ethernet  HWaddr 00:50:56:00:1f:68  
          inet addr:212.83.153.71  Bcast:212.83.153.71  Mask:255.255.255.255              
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:76059 errors:0 dropped:26 overruns:0 frame:0
          TX packets:7224 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6482760 (6.4 MB)  TX bytes:2080684 (2.0 MB)

eth1      Link encap:Ethernet  HWaddr 00:0c:29:46:5a:f2  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:252 errors:0 dropped:0 overruns:0 frame:0
          TX packets:608 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:42460 (42.4 KB)  TX bytes:82474 (82.4 KB)

/etc/iptables.conf

*nat
:PREROUTING ACCEPT [142:12571]
:INPUT ACCEPT [5:1076]
:OUTPUT ACCEPT [8:496]
:POSTROUTING ACCEPT [8:496]
-A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
COMMIT

*filter
:INPUT ACCEPT [2:72]
:FORWARD ACCEPT [4:336]
:OUTPUT ACCEPT [6:328]
-A INPUT -i eth1 -p tcp -j ACCEPT
-A INPUT -i eth1 -p udp -j ACCEPT
-A INPUT -i eth0 -p tcp --dport ssh -j ACCEPT
COMMIT

CentOS

eth0      Link encap:Ethernet  HWaddr 00:0C:29:74:1C:55  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe74:1c55/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:499 errors:0 dropped:0 overruns:0 frame:0
          TX packets:475 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:68326 (66.7 KiB)  TX bytes:82641 (80.7 KiB)

The main problem is that if i execute this command from the CentOS instance

ssh 192.168.1.2

it takes more than 20s to connect. It seems like it's routing the connection to the wrong network.

What could it be? Thanks!

1 Answer 1

1

Most times SSH connection delays are caused by reverse DNS lookup failure. Try one of the following to resolve the issue...

1: Add the following line to your /etc/ssh/sshd_config:

UseDNS no

2: Add the hostname and IP to /etc/hosts

centos 192.168.1.1
ubuntu 192.168.1.2
0

You must log in to answer this question.

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