I have a VPC with two EC2 instances:
- API
- Private IP
10.0.103.200
(private subnet)
- Private IP
- VPN router
- Private IP
10.0.103.100
(private subnet) - Private IP
10.0.4.100
(public subnet) and public IP - Internally set IP
10.69.69.1
- Private IP
VPN's public IP is used by external devices to connect using IPSEC/L2TP. The clients connecting this way are getting addresses from 10.69.69.0/24
space, which is managed only within the VPN machine itself. VPN machine has address 10.69.69.1
Of course, AWS routing table does not know about 10.69.69.1
, however, as API can see and communicate with VPN, I should be able to just do:
ip route add 10.69.69.0/24 via 10.0.103.100
Unfortunately, this does not work and 10.69.69.1
is still not accessible from API. I have verified that VPN does not get any traffic at all in this case.
Is AWS doing something that would not let me achieve this?
End goal is to make the whole 10.69.69.0/24
accessible from API, but first step is to have access to VPN's own address in that space.
I know AWS has its own VPN services as well, but those are way too expensive for my use case. I need a bunch of boxes (LTE router, Raspbery Pi and IP camera) to be connected. AWS IoT seems cool but unfortunately probably does not solve my goal. Also, I would like to avoid having to connect from API to VPN using IPSEC/L2TP, but currently it seems to be the only option that I know of.