Go Premium for a chance to win a PS4. Enter to Win


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
  • 3
  • 2
LVL 17

Accepted Solution

Jimmy Larsson, CISSP, CEH 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 xxx.xxx.xxx.xxx.  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

by:Jimmy Larsson, CISSP, CEH
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.

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

LVL 20

Expert Comment

ID: 33452048
Sorry about that.  I misread that statement totally.  YES, I was being silly and...wow!   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

by:Jimmy Larsson, CISSP, CEH
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

Choose an Exciting Career in Cybersecurity

Help prevent cyber-threats and provide solutions to safeguard our global digital economy. Earn your MS in Cybersecurity. WGU’s MSCSIA degree program was designed in collaboration with national intelligence organizations and IT industry leaders.

Question has a verified solution.

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

As managed cloud service providers, we often get asked to intervene when cloud deployments go awry. Attracted by apparent ease-of-use, flexibility and low computing costs, companies quickly adopt leading public cloud platforms such as Amazon Web Ser…
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
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…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

782 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