Home » Mailing lists » Users » can access vps from server not from network
can access vps from server not from network [message #3168] |
Tue, 16 May 2006 02:38 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
abhishek jain
Messages: 9 Registered: May 2006
|
Junior Member |
|
|
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.
Pl. tell me how to correct that.
Thanks,
Abhishek jain
|
|
|
Re: can access vps from server not from network [message #3171 is a reply to message #3168] |
Tue, 16 May 2006 08:36 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
rkagan
Messages: 11 Registered: May 2006 Location: Moscow
|
Junior Member |
|
|
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.
|
|
|
Re: can access vps from server not from network [message #3187 is a reply to message #3168] |
Tue, 16 May 2006 18:07 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
abhishek jain
Messages: 9 Registered: May 2006
|
Junior Member |
|
|
>>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
|
|
|
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 message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
|
(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
>
> ------------------------------------------------------------ ------------
>
|
|
|
Re: can access vps from server not from network [message #3193 is a reply to message #3168] |
Wed, 17 May 2006 02:02 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
abhishek jain
Messages: 9 Registered: May 2006
|
Junior Member |
|
|
Hi,
Just to add to that,
I get the following error while i type /etc/init.d/network restart
[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.
Can anyone suggest that why does the VPS fails to do network restart.
Thanks,
Abhishek jain
On 5/17/06, abhishek jain <mail@ejain.com> wrote:
>
> Hi,
> No the nameserver does not seem to be the problem , as i have already
> configured that.
> i have already had a entry at /etc/resolv.conf .
> I think the problem like in some setting for the default gateway and like.
> I am not sure,but that seems to be the problem to me, Can anyone suggest
> the right network settings for the same.
> Also the error i get when wget is:
>
> -bash-3.00# wget yahoo.com
> --20:57:42-- http://yahoo.com/
> => `index.html'
> Resolving yahoo.com... failed: Temporary failure in name resolution.
>
> Also this does not seem to be a firewall issue as i have not set up a
> firewall
> Thanks
> --
> Thanks,
> Abhishek jain
>
>
> On 5/17/06, wrote:
> >
> > (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
> > >
> > > ------------------------------------------------------------
> > ------------
> > >
> >
>
>
|
|
|
Re: can access vps from server not from network [message #3194 is a reply to message #3168] |
Wed, 17 May 2006 02:00 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
abhishek jain
Messages: 9 Registered: May 2006
|
Junior Member |
|
|
Hi,
No the nameserver does not seem to be the problem , as i have already
configured that.
i have already had a entry at /etc/resolv.conf .
I think the problem like in some setting for the default gateway and like.
I am not sure,but that seems to be the problem to me, Can anyone suggest the
right network settings for the same.
Also the error i get when wget is:
-bash-3.00# wget yahoo.com
--20:57:42-- http://yahoo.com/
=> `index.html'
Resolving yahoo.com... failed: Temporary failure in name resolution.
Also this does not seem to be a firewall issue as i have not set up a
firewall
Thanks
--
Thanks,
Abhishek jain
On 5/17/06, wrote:
>
> (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
> >
> > ------------------------------------------------------------
> ------------
> >
>
|
|
|
Re: Re: can access vps from server not from network [message #3196 is a reply to message #3194] |
Wed, 17 May 2006 03:09 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
Lyndsay Roger
Messages: 3 Registered: May 2006
|
Junior Member |
|
|
On Wed, 2006-05-17 at 07:30 +0530, abhishek jain wrote:
> Hi,
> No the nameserver does not seem to be the problem , as i have already
> configured that.
> i have already had a entry at /etc/resolv.conf .
> I think the problem like in some setting for the default gateway and
> like.
> I am not sure,but that seems to be the problem to me, Can anyone
> suggest the right network settings for the same.
> Also the error i get when wget is:
I am also having network problems from a VPS (may or may not be related
to this :-)
I can ping the nameserver for about 10 minutes after it is started and
then it stops.
Any ideas?
See the following -
root@gombadi:~# vzlist
VPSID NPROC STATUS IP_ADDR HOSTNAME
103 19 running 192.168.171.203 vps103.gombadi.com
root@gombadi:~# vzctl enter 103
entered into VPS 103
dircolors: no SHELL environment variable, and no shell type option given
vps103:/# cat /etc/resolv.conf
search gombadi.com
nameserver 192.168.171.237
vps103:/# ping 192.168.171.237
PING 192.168.171.237 (192.168.171.237) 56(84) bytes of data.
--- 192.168.171.237 ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 7998ms
vps103:/# exit
logout
exited from VPS 103
root@gombadi:~# vzctl stop 103
Stopping VPS ...
VPS was stopped
VPS is unmounted
root@gombadi:~# vzctl start 103
Warning: configuration file for distribution deb3.1-xen-base-nokernel.1
not found default used
Starting VPS ...
VPS is mounted
Adding IP address(es): 192.168.171.203
Setting CPU units: 1000
Set hostname: vps103.gombadi.com
File resolv.conf was modified
VPS start in progress...
root@gombadi:~# vzctl enter 103
entered into VPS 103
dircolors: no SHELL environment variable, and no shell type option given
vps103:/# cat /etc/resolv.conf
search gombadi.com
nameserver 192.168.171.237
vps103:/# date
Wed May 17 12:36:23 EST 2006
vps103:/# ping 192.168.171.237
PING 192.168.171.237 (192.168.171.237) 56(84) bytes of data.
64 bytes from 192.168.171.237: icmp_seq=1 ttl=63 time=0.204 ms
64 bytes from 192.168.171.237: icmp_seq=2 ttl=63 time=0.170 ms
64 bytes from 192.168.171.237: icmp_seq=3 ttl=63 time=0.175 ms
64 bytes from 192.168.171.237: icmp_seq=4 ttl=63 time=0.168 ms
--- 192.168.171.237 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.168/0.179/0.204/0.017 ms
vps103:/# date
Wed May 17 12:45:53 EST 2006
vps103:/# ping -c 1 192.168.171.237
PING 192.168.171.237 (192.168.171.237) 56(84) bytes of data.
--- 192.168.171.237 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
vps103:/# cat /etc/resolv.conf
search gombadi.com
nameserver 192.168.171.237
|
|
|
Re: Re: can access vps from server not from network [message #3198 is a reply to message #3196] |
Wed, 17 May 2006 05:05 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
John Kelly
Messages: 97 Registered: May 2006 Location: Palmetto State
|
Member |
|
|
On Wed, 17 May 2006 13:09:03 +1000, Lyndsay Roger <openvz@gombadi.com>
wrote:
>I can ping the nameserver for about 10 minutes after it is started and
>then it stops.
>
>Any ideas?
Examine your packet flow with tcpdump on the VPS and the HN. First
when it's working, and then again, after it fails. That may give you
a better idea where the problem is.
|
|
|
Goto Forum:
Current Time: Thu Sep 12 07:43:25 GMT 2024
Total time taken to generate the page: 0.05291 seconds
|