*SOLVED* What I am mistaking. Help please [message #37198] |
Wed, 26 August 2009 09:23 |
dragos2
Messages: 15 Registered: August 2009
|
Junior Member |
|
|
I have a fresh Ubuntu server 8.04 64 bit LTS installed,
then I installed the openvz kernel from repositories,
booted into it.
The server has a static ip and a domain assigned.
Then downloaded most of the precreated templates and created
containers from them and started them, but I did not had
internet access from then ouside and vice-versa.
Then I assigned them the same IP public static ip and nameservers
and the same domain. This did not worked too.
What am I missing ?
My /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth1
iface eth1 inet static
address 193.19.*.*
netmask 255.255.255.0
network 193.19.*.*
broadcast 193.19.*.*
gateway 193.19.*.*
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 193.19.*.*
dns-search mydomain.com
[Updated on: Thu, 27 August 2009 07:54] by Moderator Report message to a moderator
|
|
|
|
Re: What I am mistaking. Help please [message #37201 is a reply to message #37199] |
Wed, 26 August 2009 11:03 |
dragos2
Messages: 15 Registered: August 2009
|
Junior Member |
|
|
Thank you.
This is my scenario(public ip is 193.19.x.y):
root@ubu01:~# hostname
ubu01.domain.com
root@deb01:~# vzctl set 777 --nameserver 193.19.*.* --ip 192.168.1.1 --save
root@ubu01:~# vzlist -a
VEID NPROC STATUS IP_ADDR HOSTNAME
777 8 running 192.168.1.1 vps.ubu01.domain.com
Allow access from outside to inside vps port 80
iptables -t nat -A PREROUTING -p tcp -d 193.19.x.y --dport port_num -i eth0 -j DNAT --to-destination 192.168.1.1:80
Allow access from inside the vps to the outside internet
iptables -t nat -A POSTROUTING -s 192.168.1.1 -o eth0 -j SNAT --to 193.19.x.y
But it is not working. I don't have internet to/from container.
I did something wrong ?
[Updated on: Wed, 26 August 2009 11:04] Report message to a moderator
|
|
|
|
|
|
|
|