*SOLVED* SSH to VPS address connects to HN [message #6924] |
Wed, 27 September 2006 18:41 |
cmorland
Messages: 2 Registered: September 2006
|
Junior Member |
|
|
I just setup OpenVZ and I have configured a VPS using the prebuilt CentOS-standard template for the VPS. My host network address is 192.168.15.72 and the VPS address is 192.168.14.74. My problem is that when I try to ssh to the VPS address I end up connecting to the host node. How can I correct this so that any request to 192.168.14.74 connects to the VPS rather than the host node.
[root@host-node cache]# vzctl start 101
Starting VPS ...
VPS is mounted
Adding IP address(es): 192.168.14.74
Setting CPU units: 1000
VPS start in progress...
[root@host-node cache]# ssh 192.168.14.74
root@192.168.14.74's password:
[root@host-node ~]#
See below for some debug info. If you need anything else let me know.
[root@host-node cache]# uname -a
Linux inhouse 2.6.8-022stab078.21-smp #1 SMP Sat Sep 9 00:34:35 MSD 2006 i686 i686 i386 GNU/Linux
[root@host-node cache]# ip r l
192.168.14.74 dev venet0 scope link src 192.168.15.72
192.168.14.0/23 dev eth0 proto kernel scope link src 192.168.15.72
169.254.0.0/16 dev eth0 scope link
default via 192.168.14.1 dev eth0
[root@host-node cache]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@host-node cache]# sysctl -p /etc/sysctl.conf
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
[root@vps101]# ip r l
191.255.255.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link
default via 191.255.255.1 dev venet0
[root@vps101]# ip a l
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP> mtu 1500 qdisc noqueue
link/void
inet 127.0.0.1/32 scope host venet0
inet 192.168.14.74/32 brd 192.168.14.74 scope global venet0:0
[Updated on: Thu, 28 September 2006 20:46] by Moderator Report message to a moderator
|
|
|
|
Re: SSH to VPS address connects to HN [message #6952 is a reply to message #6934] |
Thu, 28 September 2006 15:14 |
cmorland
Messages: 2 Registered: September 2006
|
Junior Member |
|
|
LOL! Looks like it was just my bash prompt confusing me! It turns out that my VE somehow inherited the hostname from the HN. Looking back at my create command I didn't specify the hostname option. Doh!
|
|
|