OpenVZ Forum


Home » General » Support » *SOLVED* Trouble getting internet to VEs
*SOLVED* Trouble getting internet to VEs [message #25505] Thu, 27 December 2007 22:10 Go to next message
etechship is currently offline  etechship
Messages: 4
Registered: December 2007
Location: Minnesota
Junior Member
I am trying to be able to get the VEs to ping google.com

I can ping google.com from the HN

This is an sh file I am creating to do it for me:
# $1 = VE_ID $2 = IP

vzctl create $1 --ostemplate debian-4.0-i386-minimal
vzlist -a
vzctl start $1
vzlist -a
vzctl exec $1 ps

echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig venet0 up
vzctl set $1 --ipadd $2 --nameserver 192.168.1.1 --hostname $1 --save
iptables -t nat -A POSTROUTING -s $2 -o eth0 -j SNAT --to 192.168.1.20


It creates the VE fine, it sets the IP, nameserver and hostname fine, but it can't get to the net.

I am kinda newer to linux, I am not sure I set the hostname and nameserver up right (that may be it)

thanks for the help
dave


Plappert

[Updated on: Fri, 28 December 2007 05:47] by Moderator

Report message to a moderator

Re: Trouble getting internet to VEs [message #25507 is a reply to message #25505] Thu, 27 December 2007 23:18 Go to previous message
etechship is currently offline  etechship
Messages: 4
Registered: December 2007
Location: Minnesota
Junior Member
It works. I was having troubles installing the kernel, so re-doing it helped

dave


Plappert
Previous Topic: *SOLVED* debian etch ssh problem
Next Topic: Installing Freeside on CentOS 4.4 VE
Goto Forum:
  


Current Time: Tue Feb 27 05:59:22 GMT 2024

Total time taken to generate the page: 0.02758 seconds