Re: Newbie Question about network.. [message #38822 is a reply to message #38820] |
Thu, 04 February 2010 13:33 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to previous message](/theme/ovz3/images/down.png) |
Lord Daedra
Messages: 5 Registered: February 2010 Location: Kolchugino
|
Junior Member |
|
|
I dont know what is better veth or venet.. what is more easy to install?
Ok, venet..
1. I need run
a) [host-node]# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
or
b) [host-node]# iptables -t nat -A POSTROUTING -o eth0:1 -j MASQUERADE
[host-node]# iptables -t nat -A POSTROUTING -o eth0:2 -j MASQUERADE
[host-node]# iptables -t nat -A POSTROUTING -o eth0:3 -j MASQUERADE
[host-node]# iptables -t nat -A POSTROUTING -o eth0:4 -j MASQUERADE
[host-node]# iptables -t nat -A POSTROUTING -o eth0:5 -j MASQUERADE
[host-node]# iptables -t nat -A POSTROUTING -o eth0:6 -j MASQUERADE
(for every IP)
?
I tried a) and reboot after - but it doesnt help for me
(Its from guide http://wiki.openvz.org/Common_Networking_HOWTOs )
2. Here http://forum.openvz.org/index.php?t=msg&&th=7188& ;amp ;amp ;goto=34847#msg_34847 I find this
route add default gw 192.168.1.1 dev eth0
I tried run this command in VPS but get error
root@database:/# route add default gw 67.205.67.1 dev eth0
SIOCADDRT: No such device
root@database:/# ifconfig
root@database:/#
Yes, I see what no devices but why they did not installed when I used "set 217 --ipadd 174.142.167.217 --save" and how to install them?
ifconfig return blank result but I dont know how to fix this..
root@database:/# cat /etc/network/interfaces
# This configuration file is auto-generated.
# WARNING: Do not edit this file, otherwise your changes will be lost.
# Please edit template /etc/network/interfaces.template instead.
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
broadcast 127.255.255.255
up ip route replace 127.0.0.0/8 dev lo
# Auto generated interfaces
auto lo
iface lo inet loopback
auto venet0
iface venet0 inet static
address 127.0.0.1
netmask 255.255.255.248
broadcast 67.205.67.1
up route add -net 192.0.2.1 netmask 255.255.255.248 dev venet0
up route add default gw 192.0.2.1
auto venet0:0
iface venet0:0 inet static
address 174.142.167.217
netmask 255.255.255.248
broadcast 67.205.67.1
May be I need change smth in /etc/network/interfaces.template ?
Please tell me any easy way how to setup Internet connecton for my VPSes
P.S. On node:
[root@cl-t127-072cl ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
174.142.167.219 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
174.142.167.218 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
174.142.167.217 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
174.142.167.216 0.0.0.0 255.255.255.248 U 0 0 0 eth0
67.205.67.0 0.0.0.0 255.255.255.224 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 67.205.67.1 0.0.0.0 UG 0 0 0 eth0
(3 VPSes)
[Updated on: Thu, 04 February 2010 13:38] Report message to a moderator
|
|
|