My topology is given below. I have VPC 10.122.0.0/20 and on-prem network is 172.16.3.0/24.
I have configured site-to-site tunnel with on-prem firewall and tunnel shows up however I am unable to communicate with on-prem servers from my digital ocean droplets and/or vice-versa.
Also I added route on my droplet i.e. to reach 172.16.3.0/24 NH is 10.122.0.7.
Any clue? I am sure Digital ocean firewall is not dropping and it has something related to routing.
IKE/IPsec SA both shows up.
Add local prefix to looback/dummy interface
To check if it possible to communicate between peers over IPSec
To be sure that all routes/policies works correct.
Plus; I forgot to mention I am not seeing packets on either devices internal interfaces. i.e. no packets from 10.122.0.2 on my on prem firewall 172.16.3.1 interface.
Still unclear to me what doesn’t work, the DigitalOcean reply doesn’t give any clues.
Do both end of tunnel encrypt packets into ESP?
Does remote receive ESP packets or is ESP protocol being blocked?
Forcing Nat-Translation might be a way around this.
Still no luck - I am sure my packets are leaving on-prem network without any issues. I really doubt it would be eth1? since eth1 is my external interface - Any way I tried with eth3 as well but still no luck
set nat source rule 50 destination address '10.122.0.0/20'
set nat source rule 50 outbound-interface 'eth1'
set nat source rule 50 source address '172.16.3.0/24'
set nat source rule 50 translation address '10.122.0.7'
run show vpn ipsec sa
Connection State Up Bytes In/Out Remote address Remote ID Proposal
----------------------------- ------- ---------- -------------- ---------------- ----------- ---------------------------------------------------------
peer-xxx.xxx.xxx.250-tunnel-0 up 66 minutes 0B/0B xxx.xxx.xx.250 N/A AES_CBC_256/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_1024
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno16777984: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:3e:ae:d3 brd ff:ff:ff:ff:ff:ff
inet **172.16.3.72/24** brd 172.16.3.255 scope global noprefixroute eno16777984
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe3e:aed3/64 scope link noprefixroute
valid_lft forever preferred_lft forever
ping 10.122.0.2
PING 10.122.0.2 (10.122.0.2) 56(84) bytes of data.
^C^C
--- 10.122.0.2 ping statistics ---
12 packets transmitted, 0 received, 100% packet loss, time 11052ms
And this is my droplet
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 02:cb:80:b1:e5:65 brd ff:ff:ff:ff:ff:ff
inet xxx.xxx.xxx.xx/20 brd xxx.xx.xx.255 scope global eth0
valid_lft forever preferred_lft forever
inet 10.47.0.5/16 brd 10.47.255.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::cb:80ff:feb1:e565/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 7a:07:88:b0:90:8d brd ff:ff:ff:ff:ff:ff
inet 10.122.0.2/20 brd 10.122.15.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::7807:88ff:feb0:908d/64 scope link
valid_lft forever preferred_lft forever
default via 128.xxxx.xxxx.1 dev eth0 proto static
10.47.0.0/16 dev eth0 proto kernel scope link src 10.47.0.5
10.122.0.0/20 dev eth1 proto kernel scope link src 10.122.0.2
xxx.xxx.xxx.0/20 dev eth0 proto kernel scope link src xxx.xxx.xxx.xxx
172.16.3.0/24 via 10.122.0.7 dev eth1
Dang!! issue is resolved.I spent almost 2 days and night and you know the issue was digital ocean firewall which was blocking the connection. Even numerous times I allowed source 172.16.3.0/24 ALL TCP/ALL UDP/ICMP but it was not allowing.
Finally this morning I thought lets remove the firewall completely and see and bang my ping started immediately. I reapplied with all the exceptions and result is same; it is blocking connection. Hence finally I had to remove then entire firewall and activated firewall on vyos.
Thanks a lot everyone for your ideas and help; it was much appreciated.