Skip to main content
toan2552
New Member
Jul 19, 2023 3:41 PM UTC
Solved

aws internet traffic and aws

Hi,

I have an IPsec connection set up from AWS to Fortigate.

In AWS, there's a private subnet containing various services, including EC2 instances.

Within my Fortinet, there are two networks - a DMZ network and an internal network, and they can communicate with the EC2 instances without any issues.

However, I'm currently facing a challenge: I want to enable internet access for the EC2 instances through the IPsec connection, following this path:

EC2 ===> Fortigate 1 ===> Internet

To achieve this, I've configured the AWS route table to have a route with destination 0.0.0.0/0 pointing to the virtual private gateway (VGW) to handle internet-bound traffic.

On the Fortigate side, I've implemented two policies. The first policy is to allow traffic from the WAN to AWS IPsec, and the second policy is to allow traffic from AWS IPsec to the WAN.

Unfortunately, despite these configurations, the setup isn't functioning as expected. When capturing traffic on the Fortigate, the results show:

1 0.000000 192.168.16.44 8.8.8.8 ICMP 60 Echo (ping) request id=0x0001, seq=51820/27850, ttl=128 (no response found!)

This suggests that the ping request from 192.168.16.44 (presumably one of the EC2 instances) to 8.8.8.8 (Google's DNS server) did not receive a response.

I'd appreciate any guidance or suggestions to troubleshoot and resolve this issue.

Thank you.

saneeshpv_FTNT
Staff
Jul 21, 2023 7:21 PM UTC

Hi,

 

I can see two routes here. Which one is Active in FIB?

 

Your traffic enters Firewall on FGT-AWS2, so it should have an active route to AWS EC2 instance via FGT-AWS2 only.

 

Best Regards,

 

Regards,

11 replies

saneeshpv_FTNT
Staff
Staff
Jul 20, 2023 7:23 AM UTC

Hi,

 

Is your FortiGate Located in AWS or are your referring to a FortiGate appliance on-premise and a VPN connection between AWS VPG and an On-premise FortiGate device?

 

If the FortiGate is on-premise and you are receiving traffic from the AWS VPC EC2 instance on the FortiGate, please check you have the required policy from AWS-IPsec(Fortigate VPN interface) to WAN and  have enabled Source NAT on this policy to use outgoing interface IP  (ie WAN interface IP). 

 

You can refer to traffic logs to confirm if this traffic is matching the right policy on the FortiGate or not and NAT is applied successfully. 

 

If my understanding of your setup is not correct, please share the diagram for better understanding.

 

Best Regards,

 

toan2552
toan2552Author
New Member
Jul 21, 2023 7:03 AM UTC

Hi Saneeshpv_FTNT

 

My proposal is to set up the AWS network as a private link, acting as a DMZ or internal network. The reason for this choice is that the Fortigate AWS SaaS incurs additional costs, and I am already paying for the Fortigate appliance.

 

The network

                            { interna..-----{--\ 

fortigate -----------{  dmz----------{ --------- internet

                           {  aws----------{--/

 

internal network (192.168.3.0/24) 

dmz network (192.168.1.0/24)

aws network (192.168.16.0/24)

 

Of course, the internal and DMZ networks have access to the internet in both directions.

 

internal and dmz  has access to aws network

but aws has not access to internet, dmz and internal

on aws route 0.0.0.0/0 is on aws ipsec vpn

I do a diagnostic by ping from e2c 192.168.16.44

 

diagnose sniffer packet any 'host 192.168.16.44 and icmp' 4 0 l
interfaces=[any]
filters=[host 192.168.16.44 and icmp]
2023-07-20 09:58:30.882948 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:58:35.887153 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:58:40.908303 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:58:45.908813 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:58:50.909318 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:58:55.910043 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:59:00.910546 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:59:05.911074 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:59:10.911382 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:59:15.911851 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request
2023-07-20 09:59:20.912448 FG-AWS-2 in 192.168.16.44 -> 8.8.8.8: icmp: echo request

 

Thank you

 

 

 

 

saneeshpv_FTNT
Staff
Staff
Jul 21, 2023 7:55 AM UTC

Hi,

 

Your AWS network (VPC) is connected to your FortiGate via IPsec VPN tunnel I am assuming, and you are receiving the traffic on the FortiGate Firewall through this VPN from EC2 instance. If so, please perform a quick sniffer with only "Destination IP and ICMP" as filter to understand if this traffic is exiting your FGT firewall over the internet WAN interface or not and below is the sniffer command.

 

diagnose sniffer packet any 'host 8.8.8.8 and icmp' 4 0 l

 

At this moment make sure you stop any other ping traffic to 8.8.8.8 apart from the one from the EC2 instance. 

 

Also did you make sure NAT is enabled in on the internet bound policy from AWS to WAN?

 

Best Regards,

stevediaz
New Member
Jul 23, 2023 11:28 AM UTC

Hello

Check your outbound security group rules on AWS for the EC2 instances to ensure internet access is allowed. Also, verify the NAT settings and ensure proper routing on both AWS and Fortigate sides.

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT