VPNsrvr: how to set VPN clients to use their local gateways?

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
Marwyn
Posts: 5
Joined: Tue Dec 10, 2013 8:52 pm

VPNsrvr: how to set VPN clients to use their local gateways?

Post by Marwyn » Tue Dec 10, 2013 9:10 pm

Hi, I installed SE VPN Server on my PC (Windows x64), created Virtual Hub, created users and granted access to 2-3 friends, they can connect OK and we see each others' shared folders, everything is fine. Except, when they connect, all of their internet traffic is routed through my PC, and they get my own public IP address.

Is it possible anywhere in settings for the SE VPN Server to specify that all incoming VPN connections should use their own default gateways, and not use the default gateway of my own PC ("gateway of remote network" from their point of view)? So that only traffic between us is our VPN traffic, and not internet traffic for their PCs routed through my router?

Or if not on Server, is it possible to specify so on SoftEther VPN Client settings? We tried looking through SoftEther settings, or even VPN network adapter settings, but we cannot find the usual tickbox in TCP/IP properties to UNtick - "Use default gateway on remote network", and UNtick it, like on the screenshot here:

http://www.fatcow.com/images/screenshot ... Step13.jpg

We have found one approach on this forum, on the topic

http://www.vpnusers.com/viewtopic.php?f=7&t=2476

Which suggests to switch on Automatic Gateway Metric on the adapter of the VPN client in Network Connections, and do manually

add route 0.0.0.0 mask 0.0.0.0 192.168.0.1

(where 192.168.0.1 is client's defautl gateway before connection)

But is there no easier option? Can this not be set somewhere on SoftEther VPN Server/Virtual Hub/Manage Users settings? Or somewhere on SoftEther VPN Client settings?


Thanks

Napsterbater
Posts: 6
Joined: Tue Aug 13, 2013 6:56 am

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by Napsterbater » Wed Dec 11, 2013 2:59 am

I was hoping for something like this as well.

In my setup I have a few computers connecting via VPN and then being bridged to the main network but I don't want their default gateway to be set to the bridged network.

I had to set them to a reserved DHCP address on the 2 Windows DHCP servers that had no default gateway.

It would be nice if there was an option to block DHCP from crossing the bridge so you could use SoftEther's DHCP for the VPN users but not let it leak to the bridged network.

inten
Posts: 375
Joined: Fri Oct 18, 2013 8:15 am
Location: All around the world
Contact:

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by inten » Wed Dec 11, 2013 4:17 am

Marwyn wrote:

> But is there no easier option? Can this not be set somewhere on SoftEther
> VPN Server/Virtual Hub/Manage Users settings? Or somewhere on SoftEther VPN
> Client settings?

Remove default gateway from vDHCP settings and disable vNAT.

[attachment=0]Screenshot 2013-12-11 15.26.27.png[/attachment]
You do not have the required permissions to view the files attached to this post.
When you don't like the answer, change the question.
Cheers,
Team.

VPNHPanel.com
This account is not associated to SoftEther project.

mesa57
Posts: 153
Joined: Fri Oct 11, 2013 4:00 pm
Location: Netherlands

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by mesa57 » Thu Dec 12, 2013 8:32 pm

Setting metric to automatic is all you have to do. No route changes.
Works here like a charm.

inten
Posts: 375
Joined: Fri Oct 18, 2013 8:15 am
Location: All around the world
Contact:

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by inten » Fri Dec 13, 2013 1:07 am

btw, on Windows automatic metric is enabled by default.

mesa57
Posts: 153
Joined: Fri Oct 11, 2013 4:00 pm
Location: Netherlands

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by mesa57 » Fri Dec 13, 2013 7:52 am

It was not in my client, where is was set to 1, making it the route with the highest priority. Btw, this is required for vpngate.

Marwyn
Posts: 5
Joined: Tue Dec 10, 2013 8:52 pm

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by Marwyn » Fri Dec 13, 2013 9:17 am

inten wrote:
>
> Remove default gateway from vDHCP settings and disable vNAT.
>
> [attachment=0]Screenshot 2013-12-11 15.26.27.png[/attachment]

Thanks Inten, I'll give this a shot over the next day or so.

Marwyn
Posts: 5
Joined: Tue Dec 10, 2013 8:52 pm

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by Marwyn » Fri Dec 13, 2013 9:18 am

mesa57 wrote:
> Setting metric to automatic is all you have to do. No route changes.
> Works here like a charm.

Hi Mesa, thanks, but what setting are you talking about precisely? Do you mean just setting "on" the Automatic Gateway Metric on the adapter of the VPN client in Network Connections?

Thx

mesa57
Posts: 153
Joined: Fri Oct 11, 2013 4:00 pm
Location: Netherlands

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by mesa57 » Fri Dec 13, 2013 9:29 am

Yes. If that does not work, you can enter a high value in the metric input box (like 999).

Marwyn
Posts: 5
Joined: Tue Dec 10, 2013 8:52 pm

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by Marwyn » Fri Dec 13, 2013 9:40 am

Cheers, I'll give both those options a shot.

inten
Posts: 375
Joined: Fri Oct 18, 2013 8:15 am
Location: All around the world
Contact:

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by inten » Fri Dec 13, 2013 9:42 am

mesa57 wrote:
> It was not in my client, where is was set to 1, making it the route with
> the highest priority. Btw, this is required for vpngate.

What do you mean saying "required"?

mesa57
Posts: 153
Joined: Fri Oct 11, 2013 4:00 pm
Location: Netherlands

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by mesa57 » Fri Dec 13, 2013 10:15 am

I mean that if you want the softether client to route all you're internet trafic over the vpnserver, as is the goal of vpngate, it should be placed as gateway with the highest priority in the route table. This is achieved by setting (default) the metric to 1.

Marwyn
Posts: 5
Joined: Tue Dec 10, 2013 8:52 pm

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by Marwyn » Sat Dec 14, 2013 6:25 pm

Hi again,

Mesa - ticking on "Automatic Gateway metric" did not do it I'm afraid, but switching it off and setting it to 999 or something high did the trick, thanks :-)



Inten - I also tried your suggestion, and it sort of worked - but I'm sure I'm missing a step or two. I made the screen settings look exactly the same as yours (the only difference is that it inclided my MAC address in the very first field), and a friend of mine was able to connect.

However, he got IP 192.168.30.10 as specified in DHCP, and I could see him quite clearly in "Manage sessions" and "Session info". He was connected, he still had his own public IP, and there was traffic between us, not a lot, but network activity for sure. However, he could not ping me at all (I am still on my local 192.168.0.2, as my router is 192.168.0.1), nor I could ping him on 192.168.30.10, and we could not see each other's shared documents through Windows Explorer?

This is the first time I am trying anything like this, so sorry if it's a stupid question, but is there anything else that we needed to do? Do I need to download SoftEther VPN Client as well, and connect to the VPN that's running locally on my machine so that I can get a 192.168.30.x address or something else?


Thanks

mesa57
Posts: 153
Joined: Fri Oct 11, 2013 4:00 pm
Location: Netherlands

Re: VPNsrvr: how to set VPN clients to use their local gatew

Post by mesa57 » Sat Dec 14, 2013 7:10 pm

I had exactly the same problem with secure nat. If you search the forum you will find a topic from me about that subject.
Apparently softether is not really fit for peer-to-peer connections. There is always need for 1 node who plays the server role.
However, if you instead of secure nat use the bridge option and bridge the virtual node, the client PC becomes part of the server network. It then gets the IP address of the server network DHCP server. That also means that they can ping each other.
Drawback however is that then the client indeed has access to the whole server network, including all other devices, not the server alone.

For a company that could be preferred, but when doing peer-to-peer networking probably not. Until now I only can recommend other solutions like Hamachi or Comodo unite (both free) which do provide in the wanted functionality.

renanmoreira
Posts: 1
Joined: Fri Mar 15, 2019 9:44 pm

Re: VPNsrvr: how to set VPN clients to use their local gateways?

Post by renanmoreira » Fri Mar 15, 2019 9:51 pm

Follow:
Manage Virtual Hub >
Virtual NAT and Virtual DHCP server (SecureNAT) >
Enabel SecureNAT >
SecureNAT Configuration (Here you set your preferences, but not set default gateway on virtual dhcp server e get the ip address from "Virtual host's network Interface Settings" >
Edit the static routing table to push >
insert "remote network addr/netmask/ ip address from "Virtual host's network Interface Settings".

Disconnect all clients and reconnect.

Post Reply