cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2336
Views
10
Helpful
6
Replies

asa-5512-x help with port forwarding using CLI or ASDM for mail server

davedoggydogg
Level 1
Level 1

im sure the processes is pretty simple but im going crazy, all the videos and written tutorials i find are for older versions of ASDM or dont really apply to my situation or are just flat out confusing with the forum threads backtracking. I have a ASA 5512 and am just trying to forward the ports so i can use my exchange mail server. if someone can show me the steps to forward ports using CLI or ASDM 7.1.3  it would be greatly appreciated. 

trying to forward ports: 2525  , 465,  110 , 143

puplic IP: 99.148.78.10 (not my real ip but just easier to work with)

ASA 5512 device: 10.10.50.50

Exchange mail server: 10.10.50.60

 

heres my conig:

 

ASA Version 9.1(2) 
!
hostname ciscoasa
enable password 8Ry2YjIyt7RRXU24 encrypted
names
!
interface GigabitEthernet0/0
 nameif outside
 security-level 0
 ip address 99.148.78.10 255.255.255.248 
!
interface GigabitEthernet0/1
 nameif inside
 security-level 100
 ip address 10.10.50.50 255.255.255.0 
!
interface GigabitEthernet0/2
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet0/3
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet0/4
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet0/5
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Management0/0
 management-only
 nameif management
 security-level 100
 ip address 192.168.110.1 255.255.255.0 
!
ftp mode passive
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
object network smtptest
pager lines 24
logging asdm informational
mtu outside 1500
mtu inside 1500
mtu management 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
!
nat (inside,outside) after-auto source dynamic any interface
route outside 0.0.0.0 0.0.0.0 99.148.78.14 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
http server enable
http 192.168.110.0 255.255.255.0 management
http 10.10.110.1 255.255.255.255 inside
http 10.10.110.0 255.255.255.0 inside
http 10.10.50.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
crypto ipsec security-association pmtu-aging infinite
crypto ca trustpool policy
telnet timeout 5
ssh timeout 5
ssh key-exchange group dh-group1-sha1
console timeout 0
dhcpd address 192.168.110.2-192.168.110.254 management
dhcpd enable management
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
!
class-map inspection_default
 match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
 parameters
  message-length maximum client auto
  message-length maximum 512
policy-map global_policy
 class inspection_default
  inspect dns preset_dns_map 
  inspect ftp 
  inspect h323 h225 
  inspect h323 ras 
  inspect rsh 
  inspect rtsp 
  inspect esmtp 
  inspect sqlnet 
  inspect skinny  
  inspect sunrpc 
  inspect xdmcp 
  inspect sip  
  inspect netbios 
  inspect tftp 
  inspect ip-options 
!
service-policy global_policy global
prompt hostname context 
no call-home reporting anonymous
Cryptochecksum:2c58621a4af5137c4fd19f7edae22e19
: end

1 Accepted Solution

Accepted Solutions

Here you go:-

i dont know what i did, but between these extra commands i got the ports to forward : 

 

 

object network obj-10.10.50.60-1

host 10.10.50.60

nat (inside,outside) static interface service tcp 80 80


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 80 80


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 80

access-group Outside_access_in in interface Outside

 

 

 

 

object network obj-10.10.50.60-2

host 10.10.50.60

nat (inside,outside) static interface service tcp 110 110


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 110 110


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 110

access-group Outside_access_in in interface Outside

 

 

 

 

object network obj-10.10.50.60-3

host 10.10.50.60

nat (inside,outside) static interface service tcp 995 995


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 995 995


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 995

access-group Outside_access_in in interface Outside

 

 

im sure the commands/coding/scripting can be cleaned up, but this worked for me.

thanks Vibhor Amrodia for your time and help!

 

(note for others as reference)

the ports in red i changed accordingly ... eg 80,110,25, etc

the neon green 1 changed for every rule i added... eg: 1,2,3,4,5, etc

 

for others that need help with similar situation  here is a great reference website that helped me alot with setting port forwarding , internet sharing , and NAT / PAT  on the ASA 5512-x , im sure it works with the updated asa 5505 as well running 8.3+

https://rowell.dionicio.net/configuring-nat-for-a-public-server-using-same-outside-interface/

View solution in original post

6 Replies 6

Vibhor Amrodia
Cisco Employee
Cisco Employee

Hi,

Try this NAT:-

object network obj-10.10.50.60

host 10.10.50.60

nat (inside,outside) static 99.148.78.10 service tcp 2525  2525

object network obj-10.10.50.60-1

host 10.10.50.60

nat (inside,outside) static 99.148.78.10 service tcp 465 465

object network obj-10.10.50.60-2

host 10.10.50.60

nat (inside,outside) static 99.148.78.10 service tcp 110 110

object network obj-10.10.50.60-3

host 10.10.50.60

nat (inside,outside) static 99.148.78.10 service tcp 143 143

Make sure that you have corresponding ports allowed on the ACL for the private IP.

Thanks and Regards,

Vibhor Amrodia

 

 

 

thanks but i got a error,  i  tried

 

object network obj-10.10.50.60

host 10.10.50.60

nat (inside,outside) static 99.148.78.10 service tcp 2525  2525

 

 it and got the following error.

 

Result of the command: "nat (inside,outside) static 99.148.78.10  service tcp 2525  2525"

ERROR: Address 99.148.78.10  overlaps with outside interface address.
ERROR: NAT Policy is not downloaded

 

any ideas?

 

i dont know what i did, but between these extra commands i got the ports to forward : 

 

 

object network obj-10.10.50.60-1

host 10.10.50.60

nat (inside,outside) static interface service tcp 80 80


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 80 80


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 80

access-group Outside_access_in in interface Outside

 

 

 

 

object network obj-10.10.50.60-2

host 10.10.50.60

nat (inside,outside) static interface service tcp 110 110


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 110 110


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 110

access-group Outside_access_in in interface Outside

 

 

 

 

object network obj-10.10.50.60-3

host 10.10.50.60

nat (inside,outside) static interface service tcp 995 995


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 995 995


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 995

access-group Outside_access_in in interface Outside

 

 

im sure the commands/coding/scripting can be cleaned up, but this worked for me.

thanks Vibhor Amrodia for your time and help!

 

(note for others as reference)

the ports in red i changed accordingly ... eg 80,110,25, etc

the neon green 1 changed for every rule i added... eg: 1,2,3,4,5, etc

 

for others that need help with similar situation  here is a great reference website that helped me alot with setting port forwarding , internet sharing , and NAT / PAT  on the ASA 5512-x , im sure it works with the updated asa 5505 as well running 8.3+

https://rowell.dionicio.net/configuring-nat-for-a-public-server-using-same-outside-interface/

 

 

Hi,

It's great that I was able to help.

If the issue is resolved , please mark the appropriate response as the answer for this thread.

Thanks and Regards,

Vibhor Amrodia

sure thing, ill give you the credit and correct answer, so it can help others in the future ....can u copy and paste my previous post and. i will mark that as correct, thanks again.

Here you go:-

i dont know what i did, but between these extra commands i got the ports to forward : 

 

 

object network obj-10.10.50.60-1

host 10.10.50.60

nat (inside,outside) static interface service tcp 80 80


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 80 80


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 80

access-group Outside_access_in in interface Outside

 

 

 

 

object network obj-10.10.50.60-2

host 10.10.50.60

nat (inside,outside) static interface service tcp 110 110


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 110 110


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 110

access-group Outside_access_in in interface Outside

 

 

 

 

object network obj-10.10.50.60-3

host 10.10.50.60

nat (inside,outside) static interface service tcp 995 995


object network INSIDE
nat (inside,outside) dynamic interface


object network MULTI-SERVER
nat (inside,outside) static interface service tcp 995 995


access-list Outside_access_in extended permit tcp any object MULTI-SERVER eq 995

access-group Outside_access_in in interface Outside

 

 

im sure the commands/coding/scripting can be cleaned up, but this worked for me.

thanks Vibhor Amrodia for your time and help!

 

(note for others as reference)

the ports in red i changed accordingly ... eg 80,110,25, etc

the neon green 1 changed for every rule i added... eg: 1,2,3,4,5, etc

 

for others that need help with similar situation  here is a great reference website that helped me alot with setting port forwarding , internet sharing , and NAT / PAT  on the ASA 5512-x , im sure it works with the updated asa 5505 as well running 8.3+

https://rowell.dionicio.net/configuring-nat-for-a-public-server-using-same-outside-interface/

Review Cisco Networking for a $25 gift card