Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Cisco ASA 5505 Config Open Ports / Forwarding

Posted on 2010-08-16
Medium Priority
Last Modified: 2012-05-10
I have a new ASA 5505 and I'm not a Cisco guy - I have everything working now, but for some reason I have a feeling I've opened up the entire network. I need Telnet access externally to forward to internal IP - Can someone tell me I am crazy and didn't open everything up and if I did - how I need to change the config to NOT have the entire network vulnerable?

ASA Version 7.2(4)
hostname HOSTNAME
domain-name DOMAIN.LOCAL
enable password PASSWORD encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
interface Vlan1
 nameif inside
 security-level 100
 ip address
interface Vlan2
 nameif outside
 security-level 0
 ip address
interface Vlan3
 no forward interface Vlan1
 nameif dmz
 security-level 50
 ip address dhcp
interface Ethernet0/0
 switchport access vlan 2
interface Ethernet0/1
interface Ethernet0/2
interface Ethernet0/3
interface Ethernet0/4
interface Ethernet0/5
interface Ethernet0/6
interface Ethernet0/7
ftp mode passive
dns server-group DefaultDNS
 domain-name walnutridge.local
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
access-list outside_access_in extended permit tcp any interface outside eq telnet
access-list outside_1_cryptomap extended permit ip
access-list inside_nat0_outbound extended permit ip
access-list outside_access_in_1 extended permit tcp any host eq telnet
access-list outside_access_in_1 extended permit ip any
pager lines 24
logging enable
logging asdm informational
mtu outside 1500
mtu inside 1500
mtu dmz 1500
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-524.bin
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1
static (inside,outside) tcp interface telnet telnet netmask
access-group outside_access_in_1 in interface outside
route outside 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
http server enable
http inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto map outside_map 1 match address outside_1_cryptomap
crypto map outside_map 1 set pfs group1
crypto map outside_map 1 set peer
crypto map outside_map 1 set transform-set ESP-3DES-SHA
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 10
 authentication pre-share
 encryption 3des
 hash sha
 group 2
 lifetime 86400
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd auto_config outside
dhcpd address inside
dhcpd dns interface inside
dhcpd wins interface inside
dhcpd enable inside

group-policy DfltGrpPolicy attributes
 banner none
 wins-server none
 dns-server none
 dhcp-network-scope none
 vpn-access-hours none
 vpn-simultaneous-logins 3
 vpn-idle-timeout none
 vpn-session-timeout none
 vpn-filter none
 vpn-tunnel-protocol IPSec l2tp-ipsec webvpn
 password-storage disable
 ip-comp disable
 re-xauth disable
 group-lock none
 pfs disable
 ipsec-udp disable
 ipsec-udp-port 10000
 split-tunnel-policy tunnelall
 split-tunnel-network-list none
 default-domain none
 split-dns none
 intercept-dhcp disable
 secure-unit-authentication disable
 user-authentication disable
 user-authentication-idle-timeout 30
 ip-phone-bypass disable
 leap-bypass disable
 nem disable
 backup-servers keep-client-config
 msie-proxy server none
 msie-proxy method no-modify
 msie-proxy except-list none
 msie-proxy local-bypass disable
 nac disable
 nac-sq-period 300
 nac-reval-period 36000
 nac-default-acl none
 address-pools none
 smartcard-removal-disconnect enable
 client-firewall none
 client-access-rule none
  functions url-entry
  html-content-filter none
  homepage none
  keep-alive-ignore 4
  http-comp gzip
  filter none
  url-list none
  customization value DfltCustomization
  port-forward none
  port-forward-name value Application Access
  sso-server none
  deny-message value Login was successful, but because certain criteria have not been met or due to some specific group policy, you do not have permission to use any of the VPN features. Contact your IT administrator for more information
  svc none
  svc keep-installer installed
  svc keepalive none
  svc rekey time none
  svc rekey method none
  svc dpd-interval client none
  svc dpd-interval gateway none
  svc compression deflate
tunnel-group type ipsec-l2l
tunnel-group ipsec-attributes
 pre-shared-key *
class-map inspection_default
 match default-inspection-traffic
policy-map type inspect dns preset_dns_map
  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
service-policy global_policy global

Question by:hwgtech
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 17

Accepted Solution

Kvistofta earned 2000 total points
ID: 33449323
access-list outside_access_in_1 extended permit tcp any host eq telnet
access-list outside_access_in_1 extended permit ip any

The first line does what you want except for that you cannot use the internal ip like that. Instead to allow inbound telnet do this:

access-list outside_access_in_1 ext permit tcp any interface outside eq telnet

The second line however opens up for any inbound traffic. Still traffic would not come in because you are only allowing inboiund telnet to the specified host with the static-command. However its not good design to allow all that traffic. Remove that.

LVL 20

Expert Comment

ID: 33451480
I agree, remove that statement by doing a:

conf t
no access-list outside_access_in_1 extended permit tcp any host eq telnet

and remove the other the same way, as you are allowing EVERYTHING to hit the external host of  I do not see that host declare anywhere, so I am assuming that it is a static address that you assigned to something outside of your network, like a webserver or a router.

I see that you also have the following statement, which I don't even see how it works or what it is for:

static (inside,outside) tcp interface telnet telnet netmask

Static's are used for one to one mappings (IDEALLY) for single host to host translations.  The syntax for a static nat is (source int, dest int) mapped_ip, real_ip netmask  Of course you can use it differently, but I don't even see an named interface of 'telnet'

If you need to get into a device on your network, then you would need to create an ACL that just permits a single IP address on the outside interface through to the inside interface over SSH.

Follow this link on how to configure SSH on an external interface:
and just use local authentication.

When you use telnet, you are sending your username and password in plain, clear text.  SOOO EASY to see and to hack.  If you dare using telnet to an external interface then expect to be breached.  When you use SSH it will be encrypted.  You can get to the device by using a ssh client like putty.

LVL 17

Expert Comment

ID: 33451935
MightySW, what is the problem with this command?

static (inside,outside) tcp interface telnet telnet netmask

It is doing static PAT for outside telnet traffic destined to the outside interface, being forwarded to the telnet-port of the 192.168-address. In this command the first "telnet" occurrance is not the name of the interface but the port. Like this:

static (inside,outside) tcp interface 23 23 netmask

The interface-name is not specified after the interface-keyword because it is already within the parentesis. Have a look at the syntax in command reference and you will se.

Introducing the WatchGuard 420 Access Point

WatchGuard's newest access point includes an 802.11ac Wave 2 chipset, providing the fastest speeds for VoIP, video and music streaming, and large data file transfers. Additionally, enjoy the benefits of strong security as the 3rd radio delivers dedicated WIPS protection!

LVL 20

Expert Comment

ID: 33452048
Sorry about that.  I misread that statement totally.  YES, I was being silly!   LOL, thanks for calling me on that K.  Yes, there is nothing wrong with that statement,  other than the fact that you probably don't want to use it externally , but syntacticaly correct.  Seriously sorry about that.  
LVL 17

Expert Comment

ID: 33452099
No problem, it could happen to anyone. ;)

hwqtech: are your questions answered, or are there anything else we can do?


Author Comment

ID: 33453214
Thank you both very much. Makes perfect sense. I knew there was something off. Telnet is for a terminal emulator application to our unix application.

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (…
On Feb. 28, Amazon’s Simple Storage Service (S3) went down after an employee issued the wrong command during a debugging exercise. Among those affected were big names like Netflix, Spotify and Expedia.
After creating this article (, 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…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
Suggested Courses

722 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