Fortinet / Sophos EC2 VPN and access EC2 from a sub account

0

Hi all,

I have a Fortinet EC2 instance configured with SSL VPN for client connections on account 1. all is working well from client to AWS account 1, however i am needing to get access to EC2 resources in a sub account 2.

I have established peering connection, EC2 in account 1 can access EC2 Sub account 2. However when the client workstation VPN's in, i am unable to get access to sub account resources.

Fortinet EC2 GUI can ping local resources in account 1, however cannot ping resources in sub account 2. I have confirmed the route table has been updated to include the sub account CIDR range I have confirmed the firewall rule has been updated to inlcude the sub account CIDR range

am also happy to use Sophos EC2 for establishing client VPN connection if required if someone has had success getting it working on this platform.

Matt C
asked 14 days ago101 views
4 Answers
0

Hello.

Have you set a route to communicate to the CIDR of subaccount 2 in the Fortinet EC2 routing settings?
Please configure the routing settings not only from the AWS route table but also from the Fortinet EC2 UI.
Also, disable "source/destination checks" in Fortinet EC2's ENI.
If you do not configure this setting, you will be configured to only receive packets whose source or destination is the EC2 IP.
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html#EIP_Disable_SrcDestCheck

profile picture
EXPERT
answered 14 days ago
  • whats interesting, and i am unsure of this config on how its exactly working. When i connect via client VPN, i am given the IP Rage of 10.212.134.200 - 10.212.134.240

    I believe this is the default CIDR distributed to Fortinet's SSL-VPN clients. https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-monitor-the-link-health-for-SSL-VPN/ta-p/263576
    Therefore, I think it is probably necessary to configure NAT settings for the VPN user in order to communicate with the resources of subaccount 2. I think you can configure NAT settings in the firewall policy, so try setting the VPN user as the source and enabling NAT. Also, don't forget to configure the following documents. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html#EIP_Disable_SrcDestCheck

  • I think the following YouTube video will help you with the settings. https://www.youtube.com/watch?v=St-sHcH9nUM
    Just to be sure, are Fortinet EC2 configured with an ENI for SSL-VPN and an ENI for communicating within the VPC? To communicate within the VPC, you need to attach not only the SSL-VPN ENI but also the internal communication ENI to EC2.

  • just confirming, i think i first need to understand ip range 10.212.134.200 - 10.212.134.240 and how this is allowing me to communicate within the same account even though no routes / security groups mention this range?. Is it due to the NAT on the firewall, and is actually using the local IP of the Fortinet EC2 instance which is part of the route table and security groups.

    I wouldn't know for sure unless I took a packet capture using something like "tcpdump", but I thought it was probably being NATed.

    as i am not using NAT in the VPC, do i still disable the source / destination check?

    If EC2 is not set as a gateway router, I think it is okay to not disable it.

    Fortinet instance only has 1 ENI + elastic IP. Comms to VPC is working fine, so unsure why i need 2 ENI?

    I think that in the YouTube video, two ENIs are set to EC2. Based on this, I decided that it was necessary. However, I thought it was unnecessary if communication was possible within the VPC.

    is there any method in AWS or Fortinet that might show where it is getting blocked?

    You may be able to enable something like VPC Flow log to see where you are being blocked. https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-cwl.html#flow-logs-cwl-create-flow-log
    Also, is the route to the CIDR of account 1 set in the VPC route table of subaccount 2? If this route is not set, I don't think communication will be able to return to account 1.

  • Just to be sure, do the EC2 security group settings for subaccount 2 allow connections from account 1?

0

Hi Riku,

confirming the route table in Fortinet GUI is where i have updated. 10.0.0.0/24 on interface SSL-VPN, matching the same config as account 1. confirming this IP range is also in AWS VPC Route Table pointing to the peering connection.

whats interesting, and i am unsure of this config on how its exactly working. When i connect via client VPN, i am given the IP Rage of 10.212.134.200 - 10.212.134.240

however, there is no route config on account 1, or security group rules within this IP range that allows comms to account 1, so i am not entirely sure how the account 1 is reachable in the first place.

Account 1 ip range 192.168.0.0/24 account 2 IP Range 10.0.0.0/24

AWS Route table shows 192.168.0.0/24 to local and 10.0.0.0/24 to peering connection

EC2 security group on account 1 shows inbound 192.168.0.0/24 all ip/ports open inbound 10.0.0.0/24 all ip/ports open.

same config for sub account 2.

so no mention of the VPN IP range in AWS Route table or EC2 security groups, yet account 1 i have access, and can ping all EC2 instances in account 1.

Matt C
answered 14 days ago
0

Hi Riku,

the youtube video is pretty much exactly how i have it configured, and i can communicate fine to other resources within the same account. all of my EC2 are not part of NAT, the subnet routes to IGW.

as i am not using NAT in the VPC, do i still disable the source / destination check?

Nat is enabled in fortinet firewall rule.

Fortinet instance only has 1 ENI + elastic IP. Comms to VPC is working fine, so unsure why i need 2 ENI?

is there any method in AWS or Fortinet that might show where it is getting blocked?

just confirming, i think i first need to understand ip range 10.212.134.200 - 10.212.134.240 and how this is allowing me to communicate within the same account even though no routes / security groups mention this range?. Is it due to the NAT on the firewall, and is actually using the local IP of the Fortinet EC2 instance which is part of the route table and security groups.

Matt C
answered 14 days ago
0

i am looking into VPC Flow Logs at the moment to get this configured, hopefully this can assist.

yes route table is set in both accounts, as i can communicate ok from ec2 in account 1 to ec2 in account 2. it is only when i am connected to client VPN / fortinet GUI where i am unable to communicate to account 2.

Matt C
answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions