+-------------------+ +------------------+ | OPNsense Site A | | OPNsense Site B | |-------------------| |------------------| | LAN 192.168.1.1 | | LAN 192.168.2.1 | | OPT1 192.168.101.1| IPsec Transport | | | WAN 172.16.11.2 | =============== | WAN 172.16.11.3 | | gre0 10.21.1.2 | --------------- | gre0 10.21.1.3 | +-------|-----------+ GRE Tunnel +-------|----------+ | | | | | | | | | LAN 192.168.1.100 --OR-- OPT1 192.168.101.100 LAN 192.168.2.3 [Host Site A] [Host Site B] (Only one interface is connected)
LAN (hn0) -> v4: 192.168.1.1/24OPT1 (hn2) -> v4: 192.168.101.1/24WAN (hn1) -> v4: 172.16.11.2/24gre10 (gre0) -> v4: 10.21.1.2/24 - MTU 1398
Internet:Destination Gateway Flags Netif Expire10.19.1.2 link#9 UH lo110.21.1.3 link#8 UH gre0127.0.0.1 link#1 UH lo0172.16.11.0/24 link#6 U hn1172.16.11.2 link#6 UHS lo0192.168.1.0/24 link#5 U hn0192.168.1.1 link#5 UHS lo0192.168.2.0/24 10.21.1.3 UGS gre0192.168.101.0/24 link#7 U hn2192.168.101.1 link#7 UHS lo0
pass out log all flags S/SA keep state allow-opts label "fae559338f65e11c53669fc3642c93c2"pass out log on enc0 all flags S/SA keep state label "c1eff64cbafdd6b80448f92cd4aff7e5"pass out log route-to (gre0 10.21.1.3) inet from (gre0) to ! (gre0:network) flags S/SA keep state allow-opts label "f7f077b5334caa29bc835d174f88b548"pass in quick inet all flags S/SA keep state label "523ba68a597fc0e535b425d2ef260b6b"pass in quick inet6 all flags S/SA keep state label "523ba68a597fc0e535b425d2ef260b6b"
nat on gre0 inet from (hn2:network) to 192.168.2.0/24 -> (hn0:0) port 1024:65535
21924229-8cb2-496e-b1d7-26cc4dc35f7d: #4, ESTABLISHED, IKEv2, e51ca149a80e6d9a_i* 4800a403859d825a_r local '172.16.11.2' @ 172.16.11.2[4500] remote '172.16.11.3' @ 172.16.11.3[4500] AES_CBC-128/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/ECP_256 established 14s ago, rekeying in 13406s e200d362-fc18-4844-aa62-0529148faa58: #3, reqid 1, INSTALLED, TRANSPORT, ESP:AES_CBC-128/HMAC_SHA2_256_128 installed 14s ago, rekeying in 3247s, expires in 3946s in cbbd2ddd, 0 bytes, 0 packets out ca6ec24e, 0 bytes, 0 packets local 172.16.11.2/32 remote 172.16.11.3/32
LAN 192.168.1.100 --OR--OPT1 192.168.101.100
LAN (hn0) -> v4: 192.168.2.1/24WAN (hn1) -> v4: 172.16.11.3/24gre10 (gre0) -> v4: 10.21.1.3/24 - MTU 1398
Internet:Destination Gateway Flags Netif Expire10.19.1.3 link#8 UH lo110.21.1.2 link#7 UH gre0127.0.0.1 link#1 UH lo0172.16.11.0/24 link#6 U hn1172.16.11.3 link#6 UHS lo0192.168.1.0/24 10.21.1.2 UGS gre0192.168.2.0/24 link#5 U hn0192.168.2.1 link#5 UHS lo0
pass out log all flags S/SA keep state allow-opts label "fae559338f65e11c53669fc3642c93c2"pass out log on enc0 all flags S/SA keep state label "c1eff64cbafdd6b80448f92cd4aff7e5"pass out log route-to (gre0 10.21.1.2) inet from (gre0) to ! (gre0:network) flags S/SA keep state allow-opts label "64abd34393f7bf3840c44e806a347bf6"pass in quick inet all flags S/SA keep state label "357faa0befdb804e3fe5f8345c9b76c7"pass in quick inet6 all flags S/SA keep state label "357faa0befdb804e3fe5f8345c9b76c7"
NONE
fa5ea186-0bb5-43fe-b570-15dd7f1b728e: #3, ESTABLISHED, IKEv2, e51ca149a80e6d9a_i 4800a403859d825a_r* local '172.16.11.3' @ 172.16.11.3[4500] remote '172.16.11.2' @ 172.16.11.2[4500] AES_CBC-128/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/ECP_256 established 68s ago, rekeying in 13094s a78735eb-f23b-4284-a4e3-30ddc2e474a2: #3, reqid 1, INSTALLED, TRANSPORT, ESP:AES_CBC-128/HMAC_SHA2_256_128 installed 68s ago, rekeying in 3483s, expires in 3892s in ca6ec24e, 0 bytes, 0 packets out cbbd2ddd, 0 bytes, 0 packets local 172.16.11.3/32 remote 172.16.11.2/32
LAN 192.168.2.3
OPNsense A:~ # tcpdump -i hn0 proto ICMP -n08:47:05.654822 IP 192.168.1.100 > 192.168.2.3: ICMP echo request, id 45, seq 1, length 6408:47:05.656662 IP 192.168.2.3 > 192.168.1.100: ICMP echo reply, id 45, seq 1, length 64
OPNsense A:~ # tcpdump -i gre0 proto ICMP -n08:47:05.654909 IP 192.168.1.100 > 192.168.2.3: ICMP echo request, id 45, seq 1, length 6408:47:05.656581 IP 192.168.2.3 > 192.168.1.100: ICMP echo reply, id 45, seq 1, length 64
OPNsense B:~ # tcpdump -i gre0 proto ICMP -n08:47:05.655683 IP 192.168.1.100 > 192.168.2.3: ICMP echo request, id 45, seq 1, length 6408:47:05.656101 IP 192.168.2.3 > 192.168.1.100: ICMP echo reply, id 45, seq 1, length 64
OPNsense B:~ # tcpdump -i hn0 proto ICMP -n08:47:05.655790 IP 192.168.1.100 > 192.168.2.3: ICMP echo request, id 45, seq 1, length 6408:47:05.656069 IP 192.168.2.3 > 192.168.1.100: ICMP echo reply, id 45, seq 1, length 64
OPNsense A:~ # pfctl -ss | grep -i icmpall icmp 192.168.2.3:49 <- 192.168.101.100:49 0:0all icmp 192.168.1.1:45468 (192.168.101.100:49) -> 192.168.2.3:45468 0:0
OPNsense B:~ # pfctl -ss | grep -i icmpall icmp 192.168.1.1:45468 -> 192.168.2.3:45468 0:0all icmp 192.168.2.3:45468 -> 192.168.1.1:45468 0:0
OPNsense A:~ # tcpdump -i hn2 proto ICMP -n08:55:12.675487 IP 192.168.101.100 > 192.168.2.3: ICMP echo request, id 47, seq 1, length 64
OPNsense A:~ # tcpdump -i gre0 proto ICMP -n08:55:12.675565 IP 192.168.1.1 > 192.168.2.3: ICMP echo request, id 41970, seq 1, length 6408:55:12.676751 IP 192.168.2.3 > 192.168.1.1: ICMP echo reply, id 41970, seq 1, length 64
OPNsense B:~ # tcpdump -i gre0 proto ICMP -n08:55:12.675977 IP 192.168.1.1 > 192.168.2.3: ICMP echo request, id 41970, seq 1, length 6408:55:12.676516 IP 192.168.2.3 > 192.168.1.1: ICMP echo reply, id 41970, seq 1, length 64
OPNsense B:~ # tcpdump -i hn0 proto ICMP -n08:55:12.676171 IP 192.168.1.1 > 192.168.2.3: ICMP echo request, id 41970, seq 1, length 6408:55:12.676489 IP 192.168.2.3 > 192.168.1.1: ICMP echo reply, id 41970, seq 1, length 64