For HTTP authentication, the ASA checks real ports when static PAT is configured. If it detects traffic destined for real
port 80, regardless of the mapped port, the ASA intercepts the HTTP connection and enforces authentication.
For example, assume that outside TCP port 889 is translated to port 80 and that any relevant ACLs permit the traffic:
object network obj-192.168.123.10-01
host 192.168.123.10
nat (inside,outside) static 10.48.66.155 service tcp 80 889
Then when users try to access 10.48.66.155 on port 889, the ASA intercepts the traffic and enforces HTTP authentication. Users
see the HTTP authentication page in their web browsers before the ASA allows HTTP connection to complete.
If the local port is different than port 80, as in the following example:
object network obj-192.168.123.10-02
host 192.168.123.10
nat (inside,outside) static 10.48.66.155 service tcp 111 889
Then users do not see the authentication page. Instead, the ASA sends an error message to the web browser, indicating that
the user must be authenticated before using the requested service.
When a mapped address is used for static PAT, it is automatically placed into the dynamic PAT pool.
For instance, this configuration,
object network my-ftp-server
host <real-server>
nat (inside,outside) static <mapped-server> ftp ftp
is equivalent to
object network my-ftp-server
host <real-server>
nat (inside,outside) static <mapped-server> ftp ftp
object network <internal>
nat (inside,outside) dynamic <mapped-server>
The second line ensures that all PAT bindings are accounted for.This accounting is necessary to avoid connection failure from
port collision.
As the the mapped address is placed under dynamic PAT, any additional service that is to be accessed through the mapped address,
must also be explicitly configured.
For example, the following is the correct configuration for three services through address 192.150.49.10. Additionally, the
SMTP and HTTP services also reside at a host with the same address as the mapped address, 192.150.49.10.
object network my-ftp-server
host <real-server>
nat (inside,outside) static <mapped-server> ftp ftp
object network my-ftp-server
host "192.150.49.10"
nat (inside,outside) static 192.150.49.10 smtp smtp
object network my-ftp-server
host "192.150.49.10"
nat (inside,outside) static 192.150.49.10 http http