Port Forwarding for L2TP

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
Solish7
Posts: 2
Joined: Thu Nov 11, 2021 7:43 am

Port Forwarding for L2TP

Post by Solish7 » Fri Nov 12, 2021 12:29 am

I set up a L2TP/IPsec and tried to connect it with my iphone. However, it does not connect. I think my VPN server is behind NAT and I need to forward UDP ports 500 and 4500. But how should I do it? My router configuration page has following fields that need to fill with information:

Private IP: 192.168.1._
Protocol: UDP
Private Port: __ __
Public Port: __ __

I know the last part of private IP. But, what I should write in private port and public ports fields?

joto
Posts: 2
Joined: Thu Nov 25, 2021 7:50 am

Re: Port Forwarding for L2TP

Post by joto » Thu Nov 25, 2021 8:10 am

open cmd and type ipconfig /all

this will show your ip - 193.168.1.2 for example or it could be something else.
The best thing to do is to type manually your ip into your windows network adapter card configuration dialog.

network connections > lan or wireless adapter card > properties> tcp/ip properties > type ip manually.
ip 192.168.1.2
mask 255.255.255.0
gateway 192.168.1.1

obtain dns automatically
Done

Then you type in your configuration page of the router

private 192.168.1.2 500 udp public 500 udp
private 192.168.1.2 4500 udp to public 4500 udp

I would also open port 1701 although I am not sure
192.168.1.2 1701 tcp to public 1701 tcp

There is even easier thing you can do.
Find DMZ setting in your router.
Enable it and type there your local ip address
192.168.1.2
Done, no need to open any ports. Everything should work.

PH-IT
Posts: 26
Joined: Tue Jan 18, 2022 9:47 am
Contact:

Re: Port Forwarding for L2TP

Post by PH-IT » Thu Jan 20, 2022 9:52 pm

I think you need to forward not only port 500 and 4500, try forwarding ESP (using IP protocol 50) too.
See http://www.networksorcery.com/enp/protocol/esp.htm for more information about ESP.

Post Reply