|
strongSwan – это программное обеспечение для создания виртуальной частной сети (VPN) на основе IPsec-протокола. Домашняя страница ПО: https://strongswan.org/.
Используется двухфакторная аутентификации пользователя:
Общая статья по работе с токенами: Ключевые носители (токены) PKCS в Astra Linux.
На сервере и клиентском узле настроить маршрутизацию пакетов, задав значения параметрам в файле /etc/sysctl.conf:
# Uncomment the next line to enable packet forwarding for IPv4 #net.ipv4.ip_forward=1 net.ipv4.ip_forward=1 # Uncomment the next line to enable packet forwarding for IPv6 # Enabling this option disables Stateless Address Autoconfiguration # based on Router Advertisements for this host #net.ipv6.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1 # Do not accept ICMP redirects (prevent MITM attacks) #net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.all.accept_redirects=0 # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.all.send_redirects=0 |
Применить заданные параметрами настройки:
sudo sysctl -p |
Установить пакеты с strongSwan:
sudo apt install strongswan libstrongswan-extra-plugins |
Настроить strongSwan-сервер, разместив в файле /etc/ipsec.conf:
config setup
charondebug="all"
strictcrlpolicy=no
uniqueids=yes
conn server
type=tunnel
auto=start
keyexchange=ikev2
authby=pubkey
left=<server static IP address>
leftcert=server.cert.pem
ike=aes256-sha1-modp1024!
esp=aes256-sha1!
aggressive=no
keyingtries=%forever
ikelifetime=28800s
lifetime=3600s
dpddelay=30s
dpdtimeout=120s
dpdaction=restart
rightsourceip=<virtual IP subnet for clients> |
Предполагается, что по статье настроен: Единый доступ к ключевым носителям разных производителей.