Re: VPS doesn't work outsite Node server [message #10994 is a reply to message #10978] |
Sun, 11 March 2007 12:26  |
xwinner
Messages: 11 Registered: December 2006
|
Junior Member |
|
|
Vasily Tarasov wrote on Sun, 11 March 2007 02:29 | Hello,
I see, that your VE config file has commented line IP_ADDRESS="..", so the routing rule in question should not appear on VE start. But the rule could appear earlier, and if you edited VE config manually while VE start the rule stays in routing table "permanently" ( well, I mean, that `vzctl stop` will not remove this rule) So, please, do it manually:
ip r d 192.168.0.101 dev venet0
and then check that the rule is disappeared.
HTH,
Vasily
|
Hello,
this is what I try, is it right ?
[root@scrameustache init.d]# ip r d 192.168.0.101 dev venet0
RTNETLINK answers: No such process
[root@scrameustache init.d]# ./vz stop
Shutting down VE 101
Stopping OpenVZ: [ OK ]
[root@scrameustache init.d]# ./vz start
Starting OpenVZ: [ OK ]
Bringing up interface venet0: [ OK ]
Configuring interface venet0: [ OK ]
Configure node UB resources: [ OK ]
Starting VE 101: [ OK ]
[root@scrameustache init.d]# ip r d 192.168.0.101 dev venet0
RTNETLINK answers: No such process
BUT, the vps works, if i make this script:
#!/bin/sh
# Script name : ServerConfig
# Configuration du serveur au démarrage du serveur
# [Console Serveur Principal]
ifconfig veth101.0 0
echo 1 > /proc/sys/net/ipv4/conf/veth101.0/forwarding
echo 1 > /proc/sys/net/ipv4/conf/veth101.0/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
vzctl exec 101 /sbin/ifconfig eth0 0
vzctl exec 101 /sbin/ip addr add 192.168.0.101 dev eth0
vzctl exec 101 /sbin/ip route add default dev eth0
ip route append 192.168.0.101 dev veth101.0
ip route del 192.168.0.101 dev venet0
. /etc/rc.d/init.d/iptables stop
. /etc/rc.d/init.d/iptables start
# End
This script can help me to run vps fine but i think this is not a clean procedure. If I reboot it works only if I start it via rc.local with this commande:
echo /vz/ServerConfig | at now + 1 minutes
note: iptables stop & start is your good idea without this stop and start, the vps doesn't work on reboot
|
|
|