In details:
-Inside server: running sshd service (DMZ2 host) on port 22. IP address: 172.16.1.15
-Public IP address provided: 113.22.14.3
-Security level:
+inside: 100
+dmz: 50
+outside: 0
Scenario:
Step 1: Define a network object contains SSH server
ASA84(config)# show run objectStep 2: Configure NAT inside the created object
object network SSH-SERVER
host 172.16.1.15
ASA84(config)# show run natNote: the nat function is created inside the object network. So you have to enter that object again and make the nat command. In above nat command, dmz is the source zone/interface of SSH server, outside is the dest zone. It means, the packets arrive from dmz zone to outside will be translated source address to 113.22.14.3.
!
object network SSH-SERVER
nat (dmz,outside) static 113.22.14.3
ASA84(config)#
Done! You've just completed configuring nat function on ASA. To really let it works, next step is to create an access list to allow connections from Internet to dmz zone.
Step 3: Create an access list for incoming connection from Internet
ASA84(config)# show run access-listTo limit number of connections, I just allow ssh connections to server by using "eq ssh" key word.
access-list ALLOW-SSH extended permit tcp any host 172.16.1.15 eq ssh
Step 4: Apply access list to interface. I use input direction to outside interface
ASA84(config)# show run access-group
access-group ALLOW-SSH in interface outside
Verify configuration
Make a connection from Internet host to 113.22.14.3
You can see here, DMZ-SSH server has 2 connections and one from 113.22.14.2 (Internet host).
No comments:
Post a Comment