0

This is what I have done

  • created VPC 192.168.0.0/16
  • created subnet 192.168.5.0/24
  • created internet gateway
  • attached internet gateway to VPC
  • created routing table
  • set destination route 0.0.0.0/0 to target the internet gateway
  • associated routing table to subnet
  • launched vyOS on EC2 using subnet with auto IP assigned (ICMP allowed)
  • created elastic IP assigned to vyOS
  • added second network interface eth1 auto IP 192.168.5.40 (default vpc secgroup)
  • rebooted machine
  • set ipsec ike and esp and preshared key with 2 tunnels. Both tunnels up
  • ping from vyOS other side 10.2.0.20 got replies
  • launced another box on same subnet with auto assigned IP with (default vpc secgroup with 22 and 80 allowed from 0.0.0.0/0 )

I have not been able to ping 10.2.0.20 from 192.168.5.40 but can from the vyOS box itself(with ip 192.168.5.17). I have added a new route on 192.168.5.40

sudo route add -net 10.2.0.0/24 gw 192.168.5.17
ubuntu@ip-192-168-5-40:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.2.0.20       192.168.5.17  0.0.0.0         UG    0      0        0 eth0
default         192.168.5.1   0.0.0.0         UG    0      0        0 eth0
192.168.5.0   *               255.255.255.0   U     0      0        0 eth0

I know I am missing a point. NAT translation? Where is the catch? Can anybody points me to the right direction? Thanks in advance

1

Common issue, make sure that you Disable Source/Destination Check on the instance ( right click -> Networking -> Change Source Dest. Check )

You'll only need to do this on the Vyos box.

You also don't really need a second interface. You could create a second subnet and on that route table for that subnet make the 0/0 route point to the Vyos instance if you want.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.