----------------------------------------------------------------------------------
@MSGID: 2:5034/10.1 1e80bfa8
@REPLY: grosbein.net 0942b61a
@CHRS: CP866 2
@PID: wfido 0.0.1/a
@TID: FTN::Pkt 1.02
@Posted: 23 Jan 26 12:58:53
Hello, Eugene!
EG> Всё работает и с радиусом, и без.
EG> https://dadv.livejournal.com/210154.html
EG> 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 =
pools = radius
3des-aes128-aes192-aes256-sha1-sha256-sha384-modp1024,aes256-sha256-modp2048,aes
256-sha256-modp1024,aes256-sha256-modp4096,default
reauth_time = 0
encap = yes
fragmentation = yes
mobike = yes
local {
auth = pubkey
certs =
id = fqdn:
}
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
3des-aes128-aes192-aes256-sha1-sha256-sha384-modp1024,aes256-sha256-modp2048,aes
256-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 =
auth_port = 1812
acct_port = 1813
retransmit_base = 1.0
retransmit_tries = 5
sockets = 5
nas_identifier =
}
}
}
радиус модуль mschap:
mschap {
use_mppe = yes
require_encryption = yes
require_strong = yes
winbind = yes
--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)
SEEN-BY: 50/109 606 104/117 221/6 301/1 341/66
450/1024 460/58 463/68 469/122
SEEN-BY: 5000/111 5001/100 5010/275 352 5015/42 46
5019/40 400 5020/113 290
SEEN-BY: 5020/545 570 715 830 837 848 921 1042
1146 2992 4441 9696 12000
SEEN-BY: 5022/2 128 5023/24 5026/49 5028/68 5030/49
115 500 1081 1474 1900
SEEN-BY: 5034/10 13 5053/51 400 5054/89 5055/73
5057/19 5058/104 5061/15 133
SEEN-BY: 5075/128 5083/1 444 6035/3 6056/1 6078/80
6090/1
@PATH: 5034/10 13 5020/715 1042 4441