3

I had created a VPN income connection in windows 7. Everyone connected can see my local files and all, but I would like them to also be able to use my internet as well.

my computer IP is 192.168.1.254, connected to a router 192.168.1.1, and the VPN interface I made it into 192.168.11.150~192.168.11.160.

So now the last step is to add to routing table, which this is what I typed:

route add 192.168.11.150 mask 255.255.255.0 192.168.1.1

and the command line returns:

The route addition failed: The parameter is incorrect.

I spent hours of research on this problem and cant seems to find the answer, unless this is not the way to let VPN users use my internet...

Any help is welcome.

Edit: After changeing the mask to 255.255.255.255, the routing goes through with

OK!

However, the user who connected to the VPN still has no access to my internet... Does anyone know where I go wrong?

3
  • Not sure if this will help, but try routing from the .11 subnet to the IP of your computer on the .1 subnet (192.168.1.254). Then maybe you'll need another routing rule on the host. Anyway, if you only have 150 through 160 on the VPN subnet, your mask probably isn't a /24, so you might need to decrease that a bit. Aug 13, 2014 at 4:43
  • I ran the above command again but this time replacing 192.168.1.1 with 192.168.1.254 and still gives same error... I am not too sure what /24 means, the 150 through 160 is just what I set it to be like this: royalbunny.tk/ips.png
    – DearMusic
    Aug 13, 2014 at 5:00
  • what about perhaps 255.255.0.0 in the route add? or why not all 192.168.1.X and 255.255.255.0? and and why are you doing route add? I did a VPN without that
    – barlop
    Dec 27, 2014 at 0:37

1 Answer 1

0

To answer your first issue: Windows takes the network address of the subnet. The network address for any /24 subnet (255.255.255.0) is 0. You want the following command:

route add 192.168.11.0 mask 255.255.255.0 192.168.1.1

Note: Your address range does not match the size of your subnet. This can have an affect on traffic destined for other networks on your connected LAN. Likely you don't care about this.

To answer your second issue: I assume "my computer" with IP 192.168.1.254 is your VPN server where you are attempting to sharing files and internet access from.

Which computer are you adding the route entry to? There is some ambiguity in your question. It would also help me to understand your intent if you attach a link to the directions you followed to get this far.

Assuming yours is a computer on a home network, and theirs is a computer on a home network:

To add internet access, you'll likely need to add a return route to 192.168.11.0 255.255.255.0 via 192.168.1.254 to your router (192.168.1.1). Directions for that change based on your router.

Either that or setup NAT on your windows VPN server. I have no idea how to do that, I don't recommend assuming the home-network to home-network use case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .