Solved

Port Forwarding on Cisco 5525-X

Posted on 2014-02-23
12
1,375 Views
Last Modified: 2014-02-23
I'm trying to setup port forwarding on a Cisco 5525-X firewall and forward connections from the public internet to an internal server.

My goal is to forward RDP requests (port 3389) sent to 67.1.1.10 to the internal server 172.23.25.20.

Here is the version that I'm working on:
151Cisco> show version

Cisco Adaptive Security Appliance Software Version 8.6(1)2
Device Manager Version 6.6(1)

Compiled on Fri 01-Jun-12 02:16 by builders
System image file is "disk0:/asa861-2-smp-k8.bin"
Config file at boot was "startup-config"

151Cisco up 2 days 1 hour

Hardware:   ASA5525, 8192 MB RAM, CPU Lynnfield 2393 MHz, 1 CPU (4 cores)
            ASA: 4096 MB RAM, 1 CPU (1 core)
Internal ATA Compact Flash, 8192MB
BIOS Flash MX25L6445E @ 0xffbb0000, 8192KB

Here is the configuration of the device currently:
ASA Version 8.6(1)2
!
hostname 151Cisco
domain-name adetor-lan
enable password xxxx encrypted
passwd xxxx encrypted
names
!
interface GigabitEthernet0/0
 nameif External
 security-level 0
 ip address 67.1.1.2 255.255.255.0
!
interface GigabitEthernet0/1
 nameif Internal
 security-level 100
 ip address 172.23.24.2 255.255.254.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 GigabitEthernet0/6
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet0/7
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Management0/0
 nameif management
 security-level 100
 ip address 192.168.1.1 255.255.255.0
 management-only
!
boot system disk0:/asa861-2-smp-k8.bin
ftp mode passive
dns server-group DefaultDNS
 domain-name domain
same-security-traffic permit intra-interface
object service RDPTCP
 service tcp source eq 3389 destination eq 3389
pager lines 24
logging asdm informational
mtu management 1500
mtu Internal 1500
mtu External 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
icmp permit any Internal
icmp permit any External
asdm image disk0:/asdm-66114.bin
no asdm history enable
arp timeout 14400
!
nat (Internal,External) after-auto source dynamic any interface
route External 0.0.0.0 0.0.0.0 67.1.1.1 1
timeout xlate 3:00:00
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.1.0 255.255.255.0 management
http 172.23.24.0 255.255.254.0 Internal
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
telnet 172.23.24.0 255.255.254.0 Internal
telnet timeout 5
ssh 172.23.24.0 255.255.254.0 Internal
ssh timeout 5
console timeout 0
management-access Internal
dhcpd address 192.168.1.2-192.168.1.254 management
dhcpd enable management
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
!
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:76d3315e5a20cd3be7ae957e28ba816c

Any help is appreciated
0
Comment
Question by:Adeste
  • 6
  • 3
  • 3
12 Comments
 
LVL 26

Expert Comment

by:Soulja
Comment Utility
151Cisco(config)# static (inside,outside) tcp 67.1.1.10 3389 172.23.25.20 3389 netmask
255.255.255.255
0
 
LVL 26

Expert Comment

by:Soulja
Comment Utility
151Cisco(config)#access-list Internet_In extended permit tcp any host 67.1.1.10 eq 3389
151Cisco(config)# access-group Internet_In in interface outside
0
 

Author Comment

by:Adeste
Comment Utility
I figured it would be easy.

One more similar question regarding NAT that I'm sure will be easy as well. I have an internal server 172.23.25.15 that I need to send email using a different external IP than normal (because the reverse DNS lookup is on a different address)

How do I setup the firewall so that when 172.23.25.15 sends traffic over port 25, it will use the IP address 67.1.1.13?
0
 
LVL 16

Assisted Solution

by:Michael Ortega (Internetwerx, Inc.)
Michael Ortega (Internetwerx, Inc.) earned 500 total points
Comment Utility
Soulja is probably referring to entries using the old ASA system software (8.2.x and older). Since you are on newer software the entries are a little different.

Best way to do it on the new system software is always via "objects" and NAT nested in the object.

object nework HOST_DOT20_RDP
 host 172.23.25.20
 nat (Internal,External) static 67.1.1.10  service tcp 3389 3389

Next is the access-list and apply it to your External interface with an access-group:

access-list outside_access_in extended permit tcy any object HOST_DOT20_RDP eq 3389
access-group outside_access_in in interface External

That's it.

MO
0
 
LVL 16

Assisted Solution

by:Michael Ortega (Internetwerx, Inc.)
Michael Ortega (Internetwerx, Inc.) earned 500 total points
Comment Utility
On the second part:

object network HOST_DOT15
 host 172.23.25.15
 nat (Internal,External) dynamic 67.1.1.13

This will cause all outbound traffic from .15 to go out as 67.1.1.13, including SMTP. To test and make sure the NAT is working properly, from the console of the email server go to ipchicken.com. It should your IP as 67.1.1.13.

MO
0
 
LVL 16

Accepted Solution

by:
Michael Ortega (Internetwerx, Inc.) earned 500 total points
Comment Utility
One small typo in my previous comment:

access-list outside_access_in extended permit tcy any object HOST_DOT20_RDP eq 3389 should be:

access-list outside_access_in extended permit tcp any object HOST_DOT20_RDP eq 3389

Sorry about that.

MO
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 16

Expert Comment

by:Michael Ortega (Internetwerx, Inc.)
Comment Utility
On future questions it would be wise to not use real identifiable IP addresses. You might use something like:

interface GigabitEthernet0/0
 nameif External
 security-level 0
 ip address 1.1.1.2 255.255.255.0

and say that you want to NAT RDP to an internal host using 1.1.1.3 as the WAN IP, etc.

MO
0
 
LVL 26

Expert Comment

by:Soulja
Comment Utility
Lol, mgortega. Yeah, it's has been awhile since I have been in ASA's. Been in Junipers lately.
0
 
LVL 16

Expert Comment

by:Michael Ortega (Internetwerx, Inc.)
Comment Utility
Soulja, "been in junipers lately"....sorry about that. =)

Been in a lot of things myself. Never going away from ASA's now.

MO
0
 

Author Comment

by:Adeste
Comment Utility
Thanks for all the help! I confirmed that's working!

PS: That was not my real external IP address but I appreciate the suggestion
0
 

Author Closing Comment

by:Adeste
Comment Utility
Worked perfectly!
0
 
LVL 16

Expert Comment

by:Michael Ortega (Internetwerx, Inc.)
Comment Utility
Awesome.

MO
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Hello , This is a short article on how would you go about enabling traceoptions on a Juniper router . Traceoptions are similar to Cisco debug commands but these traceoptions are implemented in Juniper networks router . The following demonstr…
There are two basic ways to configure a static route for Cisco IOS devices. I've written this article to highlight a case study comparing the configuration of a static route using the next-hop IP and the configuration of a static route using an outg…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now