Hello, Eugene!
Всё работает и с радиусом, и без.
https://dadv.livejournal.com/210154.html https://dadv.dreamwidth.org/196385.html
а костылях вчера получил более менее рабочую конфигурацию, только есть нюансы:
1. В андроид клиенте IPSec идентификатор упорно суется в Username (ну я пользую самбу как хранилище лдап юзеров) не раскурил до конца может, как только не крутил чет не допер пока,
с виндой таких проблем нет
2. Скрипт на сколько я понял из статьи у меня не завелся (или маршрут криво ставится на локалхост не помню 4 утра было),
в общем у меня заработал такой варик:
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
mtu=1400
me=10.10.10.1
case "$PLUTO_VERB" in
up-client)
if [ -n "$PLUTO_REQID" ]; then
ifname=$(ifconfig ipsec create)
ifconfig $ifname group "r${PLUTO_REQID}g"
ifconfig $ifname inet $me "$PLUTO_PEER_SOURCEIP" netmask 255.255.255.255
ifconfig $ifname reqid "$PLUTO_REQID"
ifconfig $ifname mtu $mtu up
route delete $me >/dev/null 2>&1
route add $me -iface $ifname
fi
;;
down-client)
if [ -n "$PLUTO_REQID" ]; then
ifname=$(ifconfig -g "r${PLUTO_REQID}g")
if [ -n "$ifname" ]; then
for i in $ifname; do
ifconfig $i destroy
done
fi
route delete $me >/dev/null 2>&1
fi
;;
esac
exit 0
Сам конфиг в таком виде:
connections {
vpn {
version = 2
send_cert = always
pull = 0
dpd_delay = 5
local_addrs = <my ext IP>
pools = radius
proposals = 3des-aes128-aes192-aes256-sha1-sha256-sha384-modp1024,aes256-sha256-modp2048,aes256-sha256-modp1024,aes256-sha256-modp4096,default
reauth_time = 0
encap = yes
fragmentation = yes
mobike = yes
local {
auth = pubkey
certs = <cert>
id = fqdn:<domain name>
}
remote {
auth = eap-radius
eap_id = %any
}
children {
roadw-eap {
mode = tunnel
ipcomp = no
copy_df = no
start_action = none
close_action = clear
dpd_action = clear
local_ts = 0.0.0.0/0
remote_ts = dynamic
esp_proposals = 3des-aes128-aes192-aes256-sha1-sha256-sha384-modp1024,aes256-sha256-modp2048,aes256-sha256-modp1024,aes256-sha256-modp4096,default
rekey_time = 0
updown = /usr/local/etc/swanctl/conf.d/updown.sh
}
}
}
}
pools {
radius {
addrs = 10.10.10.2-10.10.10.254
dns = 10.10.10.1, 8.8.8.8, 1.1.1.1
}
}
Конфа радиус модуля:
eap-radius {
eap_start = no
load = yes
forward_identity = yes
servers {
radius {
address = 127.0.0.1
secret = <secret>
auth_port = 1812
acct_port = 1813
retransmit_base = 1.0
retransmit_tries = 5
sockets = 5
nas_identifier = <fqdn>
}
}
}
радиус модуль mschap:
mschap {
use_mppe = yes
require_encryption = yes
require_strong = yes
winbind = yes
ntlm_auth = "/usr/local/bin/ntlm_auth --request-nt-key --username=%{%{Stripped-User-Name}:-%{%{mschap:User-Name}:-%{%{User-Name}:-None}}} --challenge=%{%{mschap:Challenge}:-00} --nt-response=%{%{mschap:NT-Response}:-00}"
ntlm_auth_timeout = 10
with_ntdomain_hack = yes
pool {
start = ${thread[pool].start_servers}
min = ${thread[pool].min_spare_servers}
max = ${thread[pool].max_servers}
spare = ${thread[pool].max_spare_servers}
uses = 0
retry_delay = 10
lifetime = 86400
cleanup_interval = 300
idle_timeout = 600
}
}
С наилучшими пожеланиями, Sergey Anohin.
--- wfido
* Origin:
https://5034.ru/wfido (2:5034/10.1)