Выдали нам учетные данные от VPN сервера.Поднял OpenSense 7.0(minimal), установил strongswan. структура сети такая
myComp--------->eth0 vpn-narhoz
192.168.1.141 | 192.168.1.34
|
eth0 gw1 eth1<------->internet<------>VPN server
192.168.1.221 ExtIP 91.214.174.2
|
|
10.0.4.83
conn narhoz
type=tunnel
keyexchange = ikev1
ike = aes128-sha1-modp1536!
esp = aes128-sha1-modp1536!
aggressive = yes
right = 91.214.174.2
rightsubnet = 10.0.4.0/24
rightid = %any
rightauth = psk
left = %any
leftauth = psk
leftauth2 = xauth
leftid = ""
leftsourceip=%config
xauth_identity = "юзернаме"
auto = start
ping от vpn-narhoz до машины 10.0.4.83 проходит, на myComp шлюзом прописан 192.168.1.221, прописал маршрут на myComp
ip route add 10.0.4.0/24 via 192.168.1.34
ip route show table 220
10.0.4.0/24 via 192.168.1.221 dev eth0 proto static src 192.168.20.101
VPN сервер выдает машине vpn-narhoz ip 192.168.20.101 Вывод команды strongswan statusall
Status of IKE charon daemon (strongSwan 5.6.1, Linux 3.10.0-693.21.1.el7.x86_64, x86_64):
uptime: 108 seconds, since May 04 16:43:50 2018
malloc: sbrk 1744896, mmap 0, used 575968, free 1168928
worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 3
loaded plugins: charon pkcs11 tpm aes des rc2 sha2 sha1 md4 md5 mgf1 random nonce x509 revocation constraints acert pubkey pkcs1 pkcs8 pkcs12 pgp dnskey sshkey pem openssl gcrypt fips-prf gmp curve25519 chapoly xcbc cmac hmac ctr ccm gcm curl attr kernel-netlink resolve socket-default farp stroke vici updown eap-identity eap-sim eap-aka eap-aka-3gpp eap-aka-3gpp2 eap-md5 eap-gtc eap-mschapv2 eap-dynamic eap-tls eap-ttls eap-peap xauth-generic xauth-eap xauth-pam xauth-noauth dhcp led duplicheck unity counters
Listening IP addresses:
192.168.1.34
Connections:
narhoz: %any...91.214.174.2 IKEv1 Aggressive
narhoz: local: [192.168.1.34] uses pre-shared key authentication
narhoz: local: uses XAuth authentication: any with XAuth identity 'akamakov'
narhoz: remote: uses pre-shared key authentication
narhoz: child: dynamic === 10.0.4.0/24 TUNNEL
Security Associations (1 up, 0 connecting):
narhoz[1]: ESTABLISHED 108 seconds ago, 192.168.1.34[192.168.1.34]...91.214.174.2[91.214.174.2]
narhoz[1]: IKEv1 SPIs: abad95d00452658f_i* f237b2a90ddf6b5f_r, pre-shared key+XAuth reauthentication in 2 hours
narhoz[1]: IKE proposal: AES_CBC_128/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1536
narhoz{1}: INSTALLED, TUNNEL, reqid 1, ESP in UDP SPIs: ce27afea_i a2de341f_o
narhoz{1}: AES_CBC_128/HMAC_SHA1_96/MODP_1536, 168 bytes_i (2 pkts, 101s ago), 168 bytes_o (2 pkts, 101s ago), rekeying in 41 minutes
narhoz{1}: 192.168.20.101/32 === 10.0.4.0/24
PS: Сори за «распашонку», но «cut» «/cut» не скрывает под спойлер код