*solved* cant login to virtual machine from other computers [message #26845] |
Sun, 03 February 2008 17:56 |
alex905
Messages: 8 Registered: February 2008 Location: London
|
Junior Member |
|
|
i can log into my virtual machine from the host machine but not from remote computers. i can log into the host machine from remote computers though.
i added the ip 192.168.0.4 to the host machine at first (yes this is all on a private network) and then added the ip 192.168.0.5 to the virtual machine. a full restart later and no luck.
i then added the ip 192.168.0.5 as a secound ip to the host machine by creating the file
ifcfg-eth0:1
the contense of the file are as fwollows
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.5
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
i noticed that the ifcfg-venet0 file on the host machine contains this code:
DEVICE=venet0
ONBOOT=yes
STARTMODE=onboot
is this normal or should this contain more information.
here is the output from the ifconfig command on the virtual machine.
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4132306944 errors:0 dropped:0 overruns:0 frame:0
TX packets:4096 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 -00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255. 255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:102 errors:0 dropped:0 overruns:0 frame:0
TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8686 (8.4 KiB) TX bytes:8091 (7.9 KiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 -00
inet addr:192.168.0.6 P-t-P:192.168.0.6 Bcast:192.168.0.6 Mask:255. 255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
seems kins jumbeled if you ask me. this is where i think the error is.
to add the ip i used the command
vzctl set 102 --ipadd 192.168.0.5 --save
any help is always greatly apriciated.
[Updated on: Sun, 03 February 2008 23:29] Report message to a moderator
|
|
|
|
Re: cant login to virtual machine from other computers [message #26848 is a reply to message #26847] |
Sun, 03 February 2008 18:25 |
alex905
Messages: 8 Registered: February 2008 Location: London
|
Junior Member |
|
|
# Load additional iptables modules (nat helpers)
# Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers are
# stored in /etc/modules.conf.
IPTABLES_MODULES=""
# Unload modules on restart and stop
# Value: yes|no, default: yes
# This option has to be 'yes' to get to a sane state for a firewall
# restart or stop. Only set to 'no' if there are problems unloading netfilter
# modules.
IPTABLES_MODULES_UNLOAD="yes"
# Save current firewall rules on stop.
# Value: yes|no, default: no
# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets stopped
# (e.g. on system shutdown).
IPTABLES_SAVE_ON_STOP="no"
# Save current firewall rules on restart.
# Value: yes|no, default: no
# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets
# restarted.
IPTABLES_SAVE_ON_RESTART="no"
# Save (and restore) rule and chain counter.
# Value: yes|no, default: no
# Save counters for rules and chains to /etc/sysconfig/iptables if
# 'service iptables save' is called or on stop or restart if SAVE_ON_STOP or
# SAVE_ON_RESTART is enabled.
IPTABLES_SAVE_COUNTER="no"
# Numeric status output
# Value: yes|no, default: yes
# Print IP addresses and port numbers in numeric format in the status output.
IPTABLES_STATUS_NUMERIC="yes"
i im prety sure its not using nat. but if it is im guessing its going to be shown on the host machine's (i take it that HN was a typo for HM)ifconfig. so here it is:
eth0 Link encap:Ethernet HWaddr 00:18:F8:0B:2F:52
inet addr:192.168.0.4 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:85674 errors:0 dropped:0 overruns:0 frame:0
TX packets:141758 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19927881 (19.0 MiB) TX bytes:25754199 (24.5 MiB)
Interrupt:20 Base address:0xcc00
eth0:1 Link encap:Ethernet HWaddr 00:18:F8:0B:2F:52
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Base address:0xcc00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:199 errors:0 dropped:0 overruns:0 frame:0
TX packets:199 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:21462 (20.9 KiB) TX bytes:21462 (20.9 KiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:94 errors:0 dropped:0 overruns:0 frame:0
TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11127 (10.8 KiB) TX bytes:10582 (10.3 KiB)
as you can see i edited venet0 a bit if its wrong please say and i wll revert it back.
[Updated on: Sun, 03 February 2008 18:26] Report message to a moderator
|
|
|
|
|
|
|
|
|