Hi All-
I'm unable to ping or connect to remote machines via an (apparently-)established site-to-site VPN. Here is what the network looks like:
-=============-
| Server |
| 192.168.1.2 |
-=============- ...other networks (192.168.[2..7].0/24) | |
-====================-
| 192.168.1.1 (eth1) |
| EdgeRouter Pro 8 |
| y.y.y.y (eth1) |
-====================- |
~~~~~~~~~~~~~~~~~~~~~~ The Internets
~~~~~~~~~~~~~~~~~~~~~~ |
-=====================-
| x.x.x.x (eth1) |
| USG Pro |
| 192.168.10.1 (eth1) |
-=====================- |
-===============-
| My Laptop |
| 192.168.10.10 |
-===============-
There is no NAT; both x.x.x.x and y.y.y.y are routable public WAN IP addresses. I followed the instructions here:
https://help.ubnt.com/hc/en-us/articles/115010686967-EdgeRouter-Site-to-Site-IPsec-VPN-to-USG
Here's the sanitized VPN configuration on the USG Pro (as created by the UniFi controller GUI):
admin@USGPro:~$ configure
[edit]
admin@USGPro# show vpn ipsec
auto-firewall-nat-exclude enable
esp-group ESP_y.y.y.y {
compression disable
lifetime 3600
mode tunnel
pfs enable
proposal 1 {
encryption aes128
hash sha1
}
}
ike-group IKE_y.y.y.y {
key-exchange ikev1
lifetime 28800
proposal 1 {
dh-group 14
encryption aes128
hash sha1
}
}
ipsec-interfaces {
interface eth2
}
nat-networks {
allowed-network 0.0.0.0/0 {
}
}
nat-traversal enable
site-to-site {
peer y.y.y.y {
authentication {
mode pre-shared-secret
pre-shared-secret "<the key>"
}
connection-type initiate
ike-group IKE_y.y.y.y
local-address x.x.x.x
tunnel 0 {
esp-group ESP_y.y.y.y
local {
prefix 192.168.10.0/24
}
remote {
prefix 192.168.1.0/24
}
}
}
}
And here is the vpn configuration on the ER8 Pro (as created by its web GUI):
dave@ERPro8:~$ configure
[edit]
dave@ERPro8# show vpn ipsec
auto-firewall-nat-exclude enable
esp-group FOO0 {
proposal 1 {
encryption aes128
hash sha1
}
}
ike-group FOO0 {
proposal 1 {
dh-group 14
encryption aes128
hash sha1
}
}
site-to-site {
peer x.x.x.x {
authentication {
mode pre-shared-secret
pre-shared-secret "<the key>"
}
connection-type initiate
description Site-to-Site
ike-group FOO0
local-address y.y.y.y
tunnel 1 {
esp-group FOO0
local {
prefix 192.168.1.0/24
}
remote {
prefix 192.168.10.0/24
}
}
}
}
When I attempt to ping 192.168.1.1 (ER Pro 8) or 192.168.1.2 (server connected directly to eth1) from 192.168.10.1 (USG Pro) or 192.168.10.10 (my laptop) no traffic goes through. The tunnel does appear to be getting successfully established at both ends, however.
Here is the StrongSwan log from the USG Pro:
admin@USGPro:~$ sudo ipsec restart
Stopping strongSwan IPsec...
Starting strongSwan 5.2.2 IPsec [starter]...
admin@USGPro:~$ sudo swanctl --log
10[KNL] creating acquire job for policy 192.168.10.10/32[icmp] === 192.168.1.1/32[icmp] with reqid {1}
10[IKE] initiating Main Mode IKE_SA peer-y.y.y.y-tunnel-0[1] to y.y.y.y
10[ENC] generating ID_PROT request 0 [ SA V V V V ]
10[NET] sending packet: from x.x.x.x[500] to y.y.y.y[500] (156 bytes)
06[NET] received packet: from y.y.y.y[500] to x.x.x.x[500] (136 bytes)
06[ENC] parsed ID_PROT response 0 [ SA V V V ]
06[IKE] received XAuth vendor ID
06[IKE] received DPD vendor ID
06[IKE] received NAT-T (RFC 3947) vendor ID
06[ENC] generating ID_PROT request 0 [ KE No NAT-D NAT-D ]
06[NET] sending packet: from x.x.x.x[500] to y.y.y.y[500] (372 bytes)
15[NET] received packet: from y.y.y.y[500] to x.x.x.x[500] (372 bytes)
15[ENC] parsed ID_PROT response 0 [ KE No NAT-D NAT-D ]
15[ENC] generating ID_PROT request 0 [ ID HASH N(INITIAL_CONTACT) ]
15[NET] sending packet: from x.x.x.x[500] to y.y.y.y[500] (108 bytes)
12[NET] received packet: from y.y.y.y[500] to xx.x.x.x[500] (76 bytes)
12[ENC] parsed ID_PROT response 0 [ ID HASH ]
12[IKE] IKE_SA peer-y.y.y.y-tunnel-0[1] established between x.x.x.x[x.x.x.x]...y.y.y.y[y.y.y.y]
12[IKE] scheduling reauthentication in 27939s
12[IKE] maximum IKE_SA lifetime 28479s
12[ENC] generating QUICK_MODE request 4144580868 [ HASH SA No KE ID ID ]
12[NET] sending packet: from x.x.x.x[500] to y.y.y.y[500] (444 bytes)
07[NET] received packet: from y.y.y.y[500] to x.x.x.x[500] (444 bytes)
07[ENC] parsed QUICK_MODE response 4144580868 [ HASH SA No KE ID ID ]
07[IKE] CHILD_SA peer-74.43.252.106-tunnel-0{1} established with SPIs cadb0cd3_i c2c6726f_o and TS 192.168.10.0/24 === 192.168.1.0/24
07[ENC] generating QUICK_MODE request 4144580868 [ HASH ]
07[NET] sending packet: from x.x.x.x[500] to y.y.y.y[500] (60 bytes)
And here is the StrongSwan log from the EdgeRouter Pro 8:
dave@ERPro8:~$ sudo ipsec restart
Stopping strongSwan IPsec...
Starting strongSwan 5.2.2 IPsec [starter]...
dave@ERPro8:~$ sudo swanctl --log
06[NET] received packet: from x.x.x.x[500] to y.y.y.y[500] (156 bytes)
06[ENC] parsed ID_PROT request 0 [ SA V V V V ]
06[IKE] received XAuth vendor ID
06[IKE] received DPD vendor ID
06[IKE] received NAT-T (RFC 3947) vendor ID
06[IKE] received draft-ietf-ipsec-nat-t-ike-02\n vendor ID
06[IKE] 72.43.248.118 is initiating a Main Mode IKE_SA
06[ENC] generating ID_PROT response 0 [ SA V V V ]
06[NET] sending packet: from y.y.y.y[500] to x.x.x.x[500] (136 bytes)
09[NET] received packet: from x.x.x.x[500] to y.y.y.y[500] (372 bytes)
09[ENC] parsed ID_PROT request 0 [ KE No NAT-D NAT-D ]
09[ENC] generating ID_PROT response 0 [ KE No NAT-D NAT-D ]
09[NET] sending packet: from y.y.y.y[500] to x.x.x.x[500] (372 bytes)
14[NET] received packet: from x.x.x.x[500] to y.y.y.y[500] (108 bytes)
14[ENC] parsed ID_PROT request 0 [ ID HASH N(INITIAL_CONTACT) ]
14[CFG] looking for pre-shared key peer configs matching 74.43.252.106...x.x.x.x[x.x.x.x]
14[CFG] selected peer config "peer-x.x.x.x-tunnel-1"
14[IKE] IKE_SA peer-x.x.x.x-tunnel-1[1] established between 74.43.252.106[74.43.252.106]...x.x.x.x[x.x.x.x]
14[IKE] scheduling reauthentication in 27996s
14[IKE] maximum IKE_SA lifetime 28536s
14[ENC] generating ID_PROT response 0 [ ID HASH ]
14[NET] sending packet: from y.y.y.y[500] to x.x.x.x[500] (76 bytes)
11[NET] received packet: from x.x.x.x[500] to y.y.y.y[500] (444 bytes)
11[ENC] parsed QUICK_MODE request 4144580868 [ HASH SA No KE ID ID ]
11[ENC] generating QUICK_MODE response 4144580868 [ HASH SA No KE ID ID ]
11[NET] sending packet: from y.y.y.y[500] to x.x.x.x[500] (444 bytes)
06[NET] received packet: from x.x.x.x[500] to y.y.y.y[500] (60 bytes)
06[ENC] parsed QUICK_MODE request 4144580868 [ HASH ]
06[IKE] CHILD_SA peer-x.x.x.x-tunnel-1{1} established with SPIs c2c6726f_i cadb0cd3_o and TS 192.168.1.0/24 === 192.168.10.0/24
Once all this is established, I'm still not able to get pings through the VPN, nor can I make SSH connections. The firewalls of btoh EdgeRouter Pro 8 and the server are configured to respond to pings and accept ssh connections on their respective 192.168.1.x interfaces.
One curiousity I noticed... On the USG Pro, I see an interface listed in the ipsec status:
admin@USGPro:~$ show vpn ipsec status
IPSec Process Running PID: 4781
1 Active IPsec Tunnels
IPsec Interfaces :
eth2 (x.x.x.x)
But on the EdgeRouter Pro 8, I do not:
dave@ERPro8:~$ show vpn ipsec status
IPSec Process Running PID: 30873
1 Active IPsec Tunnels
IPsec Interfaces :
I'm out of ideas for what I could be doing wrong, or other things to test!
Thanks in advance,
Dave