0

trying to install tinc on VPS but config need Subnet which is modem IP i think as they entered 10.0.0.1/32 on demo. but on my vps ping of either 10.0.0.1/32 or 192.168.1.1 don't replay. if i put 127.0.0.1 it works ? (i have centOS 6)

Update1:

[root@vps9605 ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 venet0
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 venet0
Sven
  • 98,649
  • 14
  • 180
  • 226
lary
  • 1
  • 3

2 Answers2

0

I have a virtuozzo VPS, too - and as far as I know, the venet0 network adapter works differently. Check out this link... Basically, the venet adapter connects two adapters to each other, and one of them is inside your VPS. The other connected device is most likely outside of your VPS, and the routing table (which would show the gateway) is not inside your VPS. So you have to do some other magic to find out the gateway.

One way could be to do a traceroute google.com and check the first ip address on the first hop, this should be the gateway.

Martin
  • 2,194
  • 7
  • 16
0

Try running route -n to view your current Kernel routing table. It should list something like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.118.136.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
0.0.0.0         10.118.136.1    0.0.0.0         UG    0      0        0 eth0

The value of Gateway in the last line is the "primary" gateway of your VPS (in this case it's 10.118.136.1).

Please note that the /32 mentioned in the example is a so called CIDR subnet notation, it means that 32 subnet bits should be used. For an IPv4 address, there are only 32 bits and a /32 means that only that IP is also the subnet (it's full notation would be 255.255.255.255).

I'm not sure wheter you are trying to setup a VPN to your hardware node or if you want to allow external VPN connections to your VPS. If it's the latter, you should be able to use the external IP address with a /32 suffix. If it's the first you should use as many bits as you want your VPN to be able to access, probably /24, equal to 255.255.255.0, which is everything that starts with the same 3 octets as your VPS IP (in the example above a subnet of 10.118.136.0/24 would allow access to all IP's between 10.118.136.0 and 10.118.136.255).

Oldskool
  • 2,025
  • 1
  • 16
  • 27