D
D
Diman892016-08-27 20:13:00
VPN
Diman89, 2016-08-27 20:13:00

Strange IP in l2tp ipsec?

ubuntu server 16.04 installed on the VPS
Script found: https://github.com/hwdsl2/setup-ipsec-vpn
Addressing, attendances\passwords corrected in the script The
phone connects successfully and the traffic runs, but Mikrotik connects, but the traffic does not run, moreover it gets a strange IP from the server:

local address: 192.168.89.1
remote address: 192.168.29.254

In /etc/ipsec.conf I am confused by several "conn", in particular conn xauth-psk, which contains one more subnet, in addition to the main one - is it needed?
conn xauth-psk
  auto=add
  leftsubnet=0.0.0.0/0
  rightaddresspool=192.168.30.10-192.168.30.249
  modecfgdns1=8.8.8.8
  modecfgdns2=8.8.4.4
  leftxauthserver=yes
  rightxauthclient=yes
  leftmodecfgserver=yes
  rightmodecfgclient=yes
  modecfgpull=yes
  xauthby=file
  ike-frag=yes
  ikev2=never
  cisco-unity=yes
  also=shared

The config with the correct addressing is written in /etc/xl2tpd/xl2tpd.conf
[global]
port = 1701

[lns default]
ip range = 192.168.29.10-192.168.29.249
local ip = 192.168.29.254
require chap = yes
refuse pap = yes
require authentication = yes
name = l2tpd
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes

At the same time, the routing table on the server shows:
route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         XXX.XXX.XXX.X     0.0.0.0         UG    0      0        0 ens3
XXX.XXX.XXX.X     0.0.0.0         255.255.255.255 UH    0      0        0 ens3
192.168.89.1    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

Trace from Mikrotik does not go further than 192.168.29.254;
It is not clear where 192.168.89.1 came from
. The /etc/ipsec.d/passwd file contains a single entry:
<LOGIN>:XXXXXXXXXXXXXXXXXXXXXX:xauth-psk
is this normal?
How to fix it so that traffic from Mikrotik successfully runs to the world?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Diman89, 2016-08-30
@Diman89

problem solved - Mikrotik was buggy. updated the firmware with a reset and started up with a half-kick

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question