OpenVZ Forum


Home » Mailing lists » Users » can access vps from server not from network
Re: Re: can access vps from server not from network [message #3189 is a reply to message #3187] Tue, 16 May 2006 20:35 Go to previous messageGo to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

(1) From inside VE, you do not need to configure any sysctl parameters.

(2) Probably the reason why you can not reach any hosts from inside VE
is you forgot to set VE's nameserver. Please do the following:
a. on the host system, check your nameserver(s) IP address(es):
# grep nameserver /etc/hosts
It should print one or more lines in the form
nameserver x.x.x.x
where x.x.x.x is an IP address.
b. Set that (those) address(es) to be VE's nameserver(s):
# vzctl set VEID --nameserver x.x.x.x [--nameserver y.y.y.y] --save

In fact, just one nameserver should be sufficient.

(3) For the next time, please provide more details. Here you wrote:

> cannot ping or wget anyfile while inside the VPS.

It would be great to show some examples here. Say, if nameserver is not
set, the error from ping or wget would be like "Temporary failure in
name resolution" or "Unable to resolve hostname xxxx.tld". Since you do
not give details here, we have to guess.

Regards,
Kir.

abhishek jain wrote:

>>>On Tue, May 16, 2006 at 08:08:14AM +0530, abhishek jain wrote:
>>> Hi,
>> >I add vps via the process listed at quick install guide, i can
> access the
>>> vps via the server on which it is hosted , but when accessing from
> outside
>>> using the assigned IP i access the server and not the VPS.
>>> I can see the ip assigned to VPS in /sbin/ifconfig of the server.
>
>>Make sure
>>
>># sysctl net.ipv4.ip_forward
>>
>>prints 1. If it doesn't, set it with
>
>># sysctl net.ipv4.ip_forward=1
>
>>To have it set on every boot you need to tweak a config file depending
>>on the distro you're using. E.g. for RedHat-based distros (RHEL,
>>Fedora, CentOS) this is /etc/sysctl.conf.
>>
>>IIRC this is mentioned in the installation guide.
>
>>Roman.
>
> hi,
> Actually the problem solved by deleting the IP from the main system.
> Now another problem arised that i can access the VPS from outside but
> cannot ping or wget anyfile while inside the VPS.
> I see the document and it was written
>
> sysctl –w net.ipv4.tcp_ecn=0
>
> I did this both on the VPS and in the Server still no result.
>
> Also i get the following error when i start the network while inside
> the VPS :
>
> [root@server ~]# /etc/init.d/network restart
> Shutting down interface venet0: [ OK ]
> Shutting down loopback interface: [ OK ]
> Setting network parameters: net.ipv4.ip_forward = 0
> error: unknown error 1 setting key 'net.ipv4.conf.default.rp_filter'
> error: unknown error 1 setting key
> 'net.ipv4.conf.default.accept_source_route'
> error: unknown error 1 setting key 'kernel.sysrq'
> error: unknown error 1 setting key 'kernel.core_uses_pid'
> [FAILED]
> Bringing up loopback interface: [ OK ]
> Bringing up interface venet0: [ OK ]
>
> This Failed line appears.
>
> Pl. help,
> Thanks,
> Abhishek jain
>
> ------------------------------------------------------------ ------------
>
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: rsync to cone VPS - Urgent for me.
Next Topic: SecurityFocus Article
Goto Forum:
  


Current Time: Mon Oct 14 10:42:58 GMT 2024

Total time taken to generate the page: 0.05878 seconds