L2TP to a home-server which uses a cascade connection

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

L2TP to a home-server which uses a cascade connection

Post by shakibamoshiri » Wed Feb 15, 2023 10:00 am

On a LAN I have several Windows or Linux machines
On Linux SE server DE version (ip 192.168.1.22)
On Win SE server Stable version (IP 192.168.1.46)

Each SE server has been connected to a remote server using CC (= cascade connection)
Each SE server has a HUB (= VPN) and each has a username (=vpn) and IPsec/PSK has been enabled

Phones are able using L2TP to connect to SE server on Linux (192.168.1.20) or Win (192.168.1.46), but the Linux machine itself L2TP to SE server fails or Win fails too.
On Linux I could use "ip" command to route 192.168.1.22 traffic via a tap devices i.e. tap_tap.

But the Win machine is a laptop which a carry round + I connect my phone to SE server on Win using L2TP.
Thus I need a solution to connect the laptop itself to SE server on itself using L2TP, while my phone can connect to this server using L2TP over WiFi (WiFi of LAN or laptop HotSpot)

here is the "server log" when the Linux machine tries to connect to SE server on itself (192.168.1.22 => 192.168.1.22)

Code: Select all

2023-02-15 13:17:03.662 L2TP PPP Session [192.168.1.22:42941]: A new PPP session (Upper protocol: L2TP) is started. IP Address of PPP Client: 192.168.1.22 (Hostname: "xxxxxx"), Port Number of PPP Client: 42941, IP Address of PPP Server: 192.168.1.22, Port Number of PPP Server: 1701, Client Software Name: "L2TP VPN Client - xelerance.com", IPv4 TCP MSS (Max Segment Size): 1374 bytes
2023-02-15 13:17:04.369 L2TP PPP Session [192.168.1.22:42941]: The PPP session is disconnected because the upper-layer protocol "L2TP" has been disconnected.
2023-02-15 13:17:04.369 L2TP PPP Session [192.168.1.22:42941]: The PPP session is disconnected.
I think the solution is a kind of either
- excluding that machine traffic (like what we have for Policy Base Routing) or
- separate that machine IP from SE server IP (SE server should listen on any other IP)

I appreciate any suggestions or solutions
Regards
Last edited by shakibamoshiri on Thu Feb 16, 2023 10:26 am, edited 1 time in total.

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: L2TP to a home-server which uses a cascade connection

Post by solo » Wed Feb 15, 2023 11:56 am

shakibamoshiri wrote:
Wed Feb 15, 2023 10:00 am
the Win machine is a laptop which a carry round + I connect my phone to SE server on Win using L2TP. Thus I need a solution to connect the laptop itself to SE server on itself using L2TP, while my phone can connect to this server using L2TP over WiFi (WiFi of LAN or laptop HotSpot)
The Win laptop is 192.168.1.46? If so, let's pick some presets from this thread:

- install MLA https://learn.microsoft.com/en-us/troub ... ck-adapter
- bridge SoftEther's hub to it
- assign a static IP to it, presumably vacant 192.168.30.2-9 from CC SE

This is for the laptop's CC SE access, no need for L2TP.
As for phones' CC SE L2TP access, create a hotspot on the 192.168.1.46 interface.

shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

Re: L2TP to a home-server which uses a cascade connection

Post by shakibamoshiri » Wed Feb 15, 2023 1:02 pm

solo wrote:
Wed Feb 15, 2023 11:56 am
The Win laptop is 192.168.1.46? If so, let's pick some presets from this thread:

- install MLA https://learn.microsoft.com/en-us/troub ... ck-adapter
- bridge SoftEther's hub to it
- assign a static IP to it, presumably vacant 192.168.30.2-9 from CC SE

This is for the laptop's CC SE access, no need for L2TP.
As for phones' CC SE L2TP access, create a hotspot on the 192.168.1.46 interface.
I needed for Win-10 so that link was linked to other and the other to others :| and I did not use that.
Here is a better one for someone needed that adopter

how-install-microsoft-loopback-adapter-windows-10

1. right click on window start menu icon and select Device manager. Device manager window will immediately open (or you may use any other way how to open device manager window)
2. click on Action, and select Add legacy hardware
3. click Next on welcome screen
4. choose "Install the hardware that i manually select from a list" and click on Next
5. scroll down and select Network adapters from offered common hardware types and click on Next
6. select Microsoft as the manufacturer, and then select Microsoft KM-TEST Loopback adapter card model, click on Next
7. click on Next
8. click on Finish

Then going to Network Setting and find new adapter and manually configure IPv4 + set the "metric" if it was not set to 1
It works with bridging to a HUB of SE server on a Windows machine.
Phone already could connect.

Question
And this means we cannot use L2TP right ? (= technically we cannot)

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: L2TP to a home-server which uses a cascade connection

Post by solo » Wed Feb 15, 2023 1:16 pm

shakibamoshiri wrote:
Wed Feb 15, 2023 1:02 pm
And this means we cannot use L2TP right ? (= technically we cannot)
Yup, it's impossible.
If you enable IPsec/L2TP function of SoftEther VPN Server, the IPsec/L2TP function of Windows will be shutdown temporary.
But why a second hand uniza.sk link is better than direct microsoft.com MLA instructions?

shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

Re: L2TP to a home-server which uses a cascade connection

Post by shakibamoshiri » Wed Feb 15, 2023 3:34 pm

solo wrote:
Wed Feb 15, 2023 1:16 pm
But why a second hand uniza.sk link is better than direct microsoft.com MLA instructions?
First
I did not say L2TP is better than MLA. The condition defines what is more suitable.
Second
I noticed with the MLA method when my laptop sleeps (goes stand-by) after waking it up. the connection is lost and "Disable/Enable" the adapter does not help and I have to set a new IP (or just save the setting again) to make it work.
Third
Beside above were mentioned, I need to set this for other family members who are non-technical and a simpler solution is preferable.

Question (regardless of a solution to use L2TP)
Is this common that a sleep-mode disconnects MLA to CC ?
I either doubt
- battery saving-mode
- power and sleep setting

shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

Re: L2TP to a home-server which uses a cascade connection

Post by shakibamoshiri » Wed Feb 15, 2023 5:41 pm

shakibamoshiri wrote:
Wed Feb 15, 2023 3:34 pm
Question (regardless of a solution to use L2TP)
Is this common that a sleep-mode disconnects MLA to CC ?
I either doubt
- battery saving-mode
- power and sleep setting
after some searching I realized Win has route and persistent route.
I tested "route" but was getting back to the same setting after rebooting.
but persistent routing like this

Code: Select all

route /p change 0.0.0.0 mask 0.0.0.0 <gateway> metric 1 if <number>
stayed permanent even after rebooting
Is this the way to stay connected always ?

Also by "disable" that network adapter I can switch back to WiFi net and by "enable" the adopter switch to CC net

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: L2TP to a home-server which uses a cascade connection

Post by solo » Thu Feb 16, 2023 12:26 am

netsh interface ip set address name="Ethernet 3" static 10.1.1.10 255.255.255.0 10.1.1.1 1

Code: Select all

Ethernet adapter Ethernet 3:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft KM-TEST Loopback Adapter
   Physical Address. . . . . . . . . : 02-00-4C-4F-4F-50
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.1.1.10(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.1.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0         10.1.1.1        10.1.1.10     26
          0.0.0.0          0.0.0.0     192.168.55.1    192.168.55.12     55
         10.1.1.0    255.255.255.0         On-link         10.1.1.10    281
        10.1.1.10  255.255.255.255         On-link         10.1.1.10    281
OK after reboot (Win 11), not sure about sleep.

shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

Re: L2TP to a home-server which uses a cascade connection

Post by shakibamoshiri » Thu Feb 16, 2023 8:48 am

strange !
for me "netsh" did not help and had no effect :|
but "route /p" worked
Thank you.

Post Reply