I am attempting to connect to my corporate network from my freebsd laptop. I have successfully connected the ipsec component via stronswan.
After getting this working, my next step is to get the l2tp portion of my l2tp/ipsec connection working. Using an example I found in the forums, I setup mpd5 like so.
When I run mpd5 manually as root, these are the results I get. Below are my interfaces and output.
I am certain it is my lack of understanding of mpd5 and wanted to see if someone spotted something I missed potentially.
Code:
initiating Main Mode IKE_SA ivpn[3] to 1.1.1.1
generating ID_PROT request 0 [ SA V V V V V ]
sending packet: from 172.31.0.5[500] to 1.1.1.1[500] (212 bytes)
received packet: from 1.1.1.1[500] to 172.31.0.5[500] (156 bytes)
parsed ID_PROT response 0 [ SA V V V V ]
received XAuth vendor ID
received NAT-T (RFC 3947) vendor ID
received DPD vendor ID
received FRAGMENTATION vendor ID
generating ID_PROT request 0 [ KE No NAT-D NAT-D ]
sending packet: from 172.31.0.5[500] to 1.1.1.1[500] (244 bytes)
received packet: from 1.1.1.1[500] to 172.31.0.5[500] (228 bytes)
parsed ID_PROT response 0 [ KE No NAT-D NAT-D ]
local host is behind NAT, sending keep alives
generating ID_PROT request 0 [ ID HASH N(INITIAL_CONTACT) ]
sending packet: from 172.31.0.5[4500] to 1.1.1.1[4500] (100 bytes)
received packet: from 1.1.1.1[4500] to 172.31.0.5[4500] (92 bytes)
parsed ID_PROT response 0 [ ID HASH V ]
received DPD vendor ID
IKE_SA ivpn[3] established between 172.31.0.5[172.31.0.5]...1.1.1.1[1.1.1.1]
scheduling reauthentication in 3307s
maximum IKE_SA lifetime 3487s
generating QUICK_MODE request 1009082280 [ HASH SA No KE ID ID NAT-OA NAT-OA ]
sending packet: from 172.31.0.5[4500] to 1.1.1.1[4500] (356 bytes)
received packet: from 1.1.1.1[4500] to 172.31.0.5[4500] (316 bytes)
parsed QUICK_MODE response 1009082280 [ HASH SA No KE ID ID NAT-OA NAT-OA ]
CHILD_SA ivpn{5} established with SPIs c93788a4_i 0f3161bf_o and TS 172.31.0.5/32[udp/l2f] === 1.1.1.1/32[udp/l2f]
generating QUICK_MODE request 1009082280 [ HASH ]
connection 'ivpn' established successfully
After getting this working, my next step is to get the l2tp portion of my l2tp/ipsec connection working. Using an example I found in the forums, I setup mpd5 like so.
Code:
#################################################################
#
# MPD configuration file
#
# This file defines the configuration for mpd: what the
# bundles are, what the links are in those bundles, how
# the interface should be configured, various PPP parameters,
# etc. It contains commands just as you would type them
# in at the console. Lines without padding are labels. Lines
# starting with a "#" are comments.
#
# $Id: mpd.conf.sample,v 1.49 2015/06/02 08:30:35 dmitryluhtionov Exp $
#
#################################################################
startup:
# configure mpd users
# set user foo bar admin
# set user foo1 bar1
# configure the console
# set console self 127.0.0.1 5005
# set console open
# configure the web server
# set web self 0.0.0.0 5006
# set web open
#
# Default configuration is "dialup"
default:
#load dialup
load ivpn_L2TP
ivpn_L2TP:
create bundle static L2TP
set bundle disable compression
set bundle disable round-robin
set bundle disable encryption
set bundle disable crypt-reqd
set bundle disable bw-manage
set bundle disable ipv6cp
set bundle enable ipcp
set ipcp no vjcomp
set iface mtu 1460
set iface idle 0
set iface enable tcpmssfix
set iface route 172.31.0.0/24
create link static L2 l2tp
set link action bundle L2TP
set link latency 0
set link max-redial 1
set link disable incoming acfcomp protocomp magicnum check-magic shortseq
set link deny chap-msv2 chap-msv1 eap acfcomp protocomp shortseq
set link accept pap
set link keep-alive 10 75
set l2tp peer 1.1.1.1
set auth authname "fakeuser"
set auth password "fakepassword"
open
When I run mpd5 manually as root, these are the results I get. Below are my interfaces and output.
Code:
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
ether 40:61:86:e3:d5:bc
hwaddr 40:61:86:e3:d5:bc
inet 172.31.0.5 netmask 0xffffff00 broadcast 172.31.0.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
ng0: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1500
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Code:
Multi-link PPP daemon for FreeBSD
process 28251 started, version 5.8 (root@111amd64-quarterly-job-04 07:26 3-Jul-2018)
[L2TP] Bundle: Interface ng0 created
[L2] [L2] Link: OPEN event
[L2] LCP: Open event
[L2] LCP: state change Initial --> Starting
[L2] LCP: LayerStart
L2TP: Initiating control connection 0x80325e310 0.0.0.0 0 <-> 1.1.1.1 1701
L2TP: Control connection 0x80325e310 terminated: 6 (expecting reply; none received)
[L2] Link: DOWN event
[L2] LCP: Down event
[L2] Link: reconnection attempt 1 in 1 seconds
[L2] Link: reconnection attempt 1
L2TP: Initiating control connection 0x80325e610 0.0.0.0 0 <-> 1.1.1.1 1701
L2TP: Control connection 0x80325e310 destroyed
L2TP: Control connection 0x80325e610 terminated: 6 (expecting reply; none received)
[L2] Link: DOWN event
[L2] Link: giving up after 1 reconnection attempts
[L2] LCP: Close event
[L2] LCP: state change Starting --> Initial
[L2] LCP: LayerFinish
[L2] LCP: Down event
L2TP: Control connection 0x80325e610 destroyed
I am certain it is my lack of understanding of mpd5 and wanted to see if someone spotted something I missed potentially.