Skip to content

Commit 897121a

Browse files
Merge pull request #242801 from aimee-littleton/patch-153
Active/Passive FTP and NAT GW
2 parents 6fb87d6 + aba9842 commit 897121a

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

articles/nat-gateway/troubleshoot-nat-connectivity.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,31 @@ What else to check for:
140140

141141
* If changing rate impacts the rate of failures, check if API rate limits, or other constraints on the destination side might have been reached.
142142

143-
### Other transient outbound connectivity issues
143+
### Active FTP and NAT gateway
144144

145-
Outbound Passive FTP may not work for NAT gateway with multiple public IP addresses, depending on your FTP server configuration.
145+
FTP uses two separate channels between a client and server, the command and data channels. Each channel communicates on separate TCP connections, one for sending the commands and the other for transferring data.
146146

147-
Passive FTP establishes different connections for control and data channels. When a NAT gateway with multiple public IP addresses sends traffic outbound, it randomly selects one of its public IP addresses for the source IP address. FTP may fail when data and control channels use different source IP addresses, depending on your FTP server configuration.
147+
In active FTP mode, the client establishes the command channel and the server establishes the data channel.
148+
149+
NAT gateway doesn't work with active FTP mode when connecting to an FTP server over the internet. Active FTP uses a PORT command from the FTP client that tells the FTP server what IP address and port for the server to use on the data channel to connect back to the client. The PORT command uses the private address of the client, which can't be changed. Client side traffic is SNATed by NAT gateway for internet-based communication so the PORT command is seen as invalid by the FTP server.
150+
151+
An alternative solution to active FTP mode when using NAT gateway to connect to an FTP server is to use passive FTP mode instead. However, in order to use NAT gateway in passive FTP mode, [some considerations](#passive-ftp-and-nat-gateway) must be made.
152+
153+
### Passive FTP and NAT gateway
154+
155+
In passive FTP mode, the client establishes connections on both the command and data channels. The client requests that the server start listening on a port rather than try to establish a connection back to the client.
156+
157+
Outbound Passive FTP may not work for NAT gateway with multiple public IP addresses, depending on your FTP server configuration. When a NAT gateway with multiple public IP addresses sends traffic outbound, it randomly selects one of its public IP addresses for the source IP address. FTP may fail when data and control channels use different source IP addresses, depending on your FTP server configuration.
148158

149159
To prevent possible passive FTP connection failures, do the following steps:
150160

151161
1. Check that your NAT gateway is attached to a single public IP address rather than multiple IP addresses or a prefix.
152162

153163
2. Make sure that the passive port range from your NAT gateway is allowed to pass any firewalls that may be at the destination endpoint.
154164

165+
> !NOTE
166+
> Reducing the amount of public IP addresses on your NAT gateway reduces the SNAT port inventory available for making outbound connections and may increase the risk of SNAT port exhaustion. Consider your SNAT connectivity needs before removing public IP addresses from NAT gateway.
167+
155168
### Extra network captures
156169

157170
If your investigation is inconclusive, open a support case for further troubleshooting and collect the following information for a quicker resolution. Choose a single virtual machine in your NAT gateway configured subnet to perform the following tests:

0 commit comments

Comments
 (0)