i need little help with L2TP/IPSec VNP. ere is what is going…
I got working VPN on ROS, which is on Public IP and two clients on same LAN on remote location.
One client is able to connect and the second isnt, is it possible to resolve this in some way ?
thank you for reaction. I will try to explain my problem more…
Im trying to use L2TP/IPSec VPN. For now I have router with public IP and working VPN server, configured by several manuals to work with windows… but the problem is this.
When a client try to connect to VPN server, everything work fine, VPN is established and network is reachable. But if there is another client on the same remote network and he try to connect to VPN server, the connection will fail, because there is established connection and remote peer for the first client with same IP. even if first client disconects and second try to connect, he fails (because of remote peer on the router with same IP)
I think you have one l2tp server (?) and one secret config (?) if you have a lot of user you need separetly secret and l2tp server for each user.
(but this is a idea I haven’t done l2tp only openvpn and ipsec tunnel)
Ok, I will try your config, but I have openvpn config too in our routers and it is same.
There are in the secret IPs of user: local and remote.
If you have secrets separately for users then you need to add local and remote IP pair and you have to use /30 (255.255.255.252) mask!! (eg. …0 is net, … 1 is local, …2 is remote, …3 is broadcast)
And you can use …5 …6 but you can not use …11 …12 pair… and more.
(You didn’t copy/paste to here secret config.)
Ok, you are right!
Need NAT-T for NATed user.
But I don’t understand your all config because I tested today with my 1100AH (ROS 5.14) and I needed this:
mod: I tested with: win7, winXP and Android phone are working well.
(you need separate l2tp-server /user with user-name)
/interface l2tp-server
add disabled=no name=l2tp-in1 user=l2tp-test
/interface l2tp-server server
set authentication=mschap2 default-profile=profile1 enabled=yes
max-mru=1460 max-mtu=1460 mrru=disabled
(you need separate secret /user)
/ppp secret
add caller-id=“” disabled=no limit-bytes-in=0 limit-bytes-out=0 name=l2tp-test
password=gizi123 profile=profile1 routes=“” service=l2tp
(because if you use generated ipsec policy then it will use default proposal)
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=
3des,aes-128,aes-192,aes-256 lifetime=30m name=default pfs-group=modp1024
ip pool for IP assignments (not DHCP-server what you wrote)
/ip pool
add name=l2tp-pool ranges=192.168.99.2-192.168.99.100
Further question, following your instructions worked well. However…
If I create a new ‘secret’ for a new user and they try to simultaneously connect at the same time they can but one user will lose network access.
I have also created a new l2tp server interface and mapped the new user to it and the same thing still happens.
Specifics:-
User A connects to VPN. User A pings device on remote network. Device ping responds OK.
User B connects to VPN. User A can no longer ping that device but User B can.
User A will no longer have access to any device on remote network until they disconnect and reconnect.
Please check assigned IPs for userA and userB.
Do you use pool for local and remote IP assignements?
Solutions:
you assign from pool but you need set for local and remote too!! (you can not give fix IP for local and dynamic for remote! because /30 mask)
you give fix IP for local and remote too ( you have to calculate IP address exactly for /30 mask!)
and how could you test it? from same public IP? because ipsec can not generate policy rule if you come same public IP.
(I tested it)
eg. if your users behind same firewall and it has a public IP and it is NATing your users then they will be shown with same public IP
The only difference was under the ipsec peer setup I used exchange-mode=main instead of exchange-mode=main-l2tp as the version on my mikrotik was 5.6 and did not support main-l2tp. I upgraded to 5.14 and changed it to use main-l2tp and it appears to be working ok now.
thank you for your exhausive explanation however, I have problem you described above
and how could you test it? from same public IP? because ipsec can not generate policy rule if you come same public IP.
(I tested it)
eg. if your users behind same firewall and it has a public IP and it is NATing your users then they will be shown with same public IP
this is what I need to solve. I got plenty of users on one remote LAN (with 1 public IP) and only the firs one is able to connect, others are screwed
(you need separate l2tp-server /user with user-name)
/interface l2tp-server
add disabled=no name=l2tp-in1 user=l2tp-test
/interface l2tp-server server
set authentication=mschap2 default-profile=profile1 enabled=yes
max-mru=1460 max-mtu=1460 mrru=disabled
I dont think I need to create interface for every user when they are created dynamicaly by default
(you need separate secret /user)
/ppp secret
add caller-id=“” disabled=no limit-bytes-in=0 limit-bytes-out=0 name=l2tp-test
password=gizi123 profile=profile1 routes=“” service=l2tp
I have hanged from main to main-l2tp and see what will happen
(because if you use generated ipsec policy then it will use default proposal)
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=
3des,aes-128,aes-192,aes-256 lifetime=30m name=default pfs-group=modp1024
I came to this
ip pool for IP assignments (not DHCP-server what you wrote)
/ip pool
add name=l2tp-pool ranges=192.168.99.2-192.168.99.100
Why VPN user cannot get IP from same server as locally connected user ? I see no diference
[/quote]
As i sad before, I had rule for protocol=ipsec-esp, but there wasnt any packet flow, so I deleted it, I will add it again ans see what will happen