Cisco ASA NAT: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 5: Zeile 5:
  
 
=Nat auf einen Rechner im Lan (Regular Static NAT)=
 
=Nat auf einen Rechner im Lan (Regular Static NAT)=
==Portforwarding auf internen Webserver==
+
=Portforwarding auf internen Bastion Host=
 +
;Webserver
 
*ciscoasa(config)# object network obj-www
 
*ciscoasa(config)# object network obj-www
 
*ciscoasa(config-network-object)# host 172.18.122.101
 
*ciscoasa(config-network-object)# host 172.18.122.101
 
*ciscoasa(config-network-object)# nat (if-inside,if-outside) static interface service tcp www www
 
*ciscoasa(config-network-object)# nat (if-inside,if-outside) static interface service tcp www www
 +
;Smtp
 +
*ciscoasa(config)# object network obj-smtp
 +
*ciscoasa(config-network-object)# host 172.18.122.101
 +
*ciscoasa(config-network-object)# nat (if-inside,if-outside) static interface service tcp smtp smtp
 +
 +
*ciscoasa(config)# object network obj-www
 +
*ciscoasa(config-network-object)# host 172.18.122.101
 +
*ciscoasa(config-network-object)# nat (if-inside,if-outside) static interface service tcp 8472 ssh
  
 
==ACL zum Portforwarding auf internen Webserver==
 
==ACL zum Portforwarding auf internen Webserver==

Version vom 15. Februar 2016, 12:14 Uhr

Maskieren auf ausgehende Interface (Regular Dynamic PAT)

  • ciscoasa(config)# object network obj-lan
  • ciscoasa(config-network-object)# subnet 172.18.122.0 255.255.255.0
  • ciscoasa(config-network-object)# nat (if-inside,if-outside) dynamic interface

Nat auf einen Rechner im Lan (Regular Static NAT)

Portforwarding auf internen Bastion Host

Webserver
  • ciscoasa(config)# object network obj-www
  • ciscoasa(config-network-object)# host 172.18.122.101
  • ciscoasa(config-network-object)# nat (if-inside,if-outside) static interface service tcp www www
Smtp
  • ciscoasa(config)# object network obj-smtp
  • ciscoasa(config-network-object)# host 172.18.122.101
  • ciscoasa(config-network-object)# nat (if-inside,if-outside) static interface service tcp smtp smtp
  • ciscoasa(config)# object network obj-www
  • ciscoasa(config-network-object)# host 172.18.122.101
  • ciscoasa(config-network-object)# nat (if-inside,if-outside) static interface service tcp 8472 ssh

ACL zum Portforwarding auf internen Webserver

  • ciscoasa(config)# access-list acl-outside extended permit tcp any object obj-bastion eq www
  • ciscoasa(config)# access-group acl-outside in interface if-outside

Portforwarding auf Port 8472 zu Port 22 internen

  • ciscoasa(config-network-object)# nat (if-inside,if-outside) static interface service tcp 22 8472
  • ciscoasa(config)# access-list acl-outside extended permit tcp any object obj-bastion eq 22