I'd like to set up an IPSec responder (VPN server) for OSX desktops and laptops.
Everything seems to work fine, except I cannot push a DNS server to be used system-wide on the initiator (VPN client).
I'm using Charon's IKEv1 support in StrongSwan 5.0.4, with Unity extensions, and OSX machines are configured graphically using "Cisco VPN" in Network Preferences.
I did try to change the service order on the client to put the VPN at the top, but that didn't help.
In scutils --dns
, the resolver only appears as resolver #1
in the DNS configuration (for scoped queries)
section, not in the first section DNS configuration
.
Here are the relevant config files:
/etc/ipsec.conf:
conn %default
ikelifetime=24h
keylife=1h
rekeymargin=10m
keyingtries=3
keyexchange=ikev1
left=%defaultroute
auto=add
conn main
leftfirewall=yes
leftsubnet=0.0.0.0/0
leftauth=psk
right=%any
rightauth=psk
rightauth2=xauth-pam
rightsourceip=172.17.0.0/22
/etc/strongswan.conf:
charon {
threads = 16
cisco_unity = yes
plugins {
attr {
dns = 172.16.0.23
split-include = 10.0.0.0/8, 172.16.0.23/32
split-exclude = 10.65.36/22
}
xauth-pam {
pam_service = ipsec
}
}
}