Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have inherited my first Cisco router and am having trouble understanding how to do NAT port forwarding correctly.

ASA: 8.0.2 ASDM: 6.1(1)

I have a single external ip address on the outside (via bridged modem) and a LAN on the inside. The LAN has another connection to the net and a PDC providing DHCP/DNS, and shouldn't be using this connection.

This connection should be doing very few things things:

  • Forwarding all incoming traffic on UDP ports 3000-3002 to same ports on 10.10.5.30
  • Forwarding all incoming traffic on TCP port 3005 to same port on 10.10.5.30
  • allowing traffic back out on same ports and protocols
  • Blocking everything else.

I think the problem we are having is that the traffic isn't going back out - the implicit deny on the inside keeps getting flagged when I do a Packet Trace.

Also, since I've started my small fiddlings to fix this issue, the inside, implicit any to any-less-secure rule has now disappeared (ooops!) - any ideas on how to address that issue?

I am comfortable on the command line with instruction (potentially your answer), less so when experimenting and investigating (my current situation).

Sanitized Conf:

: Saved
:
ASA Version 8.0(2) 
!
hostname BLAH-ASA
domain-name BLAH.local
enable password BLAH encrypted
names
name 15.8.15.3 BLAH_ASA_Outside
name 192.168.6.254 vpn_local
name 10.10.5.5 FS1 description BLAH File Server
name 10.10.5.30 W_BASE description W Base Station
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 10.10.5.2 255.255.255.0 
!
interface Vlan2
 nameif outside
 security-level 0
 pppoe client vpdn group global
 ip address pppoe 
!
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
!
passwd BLAH encrypted
boot system disk0:/asa802-k8.bin
ftp mode passive
clock timezone EST 10
clock summer-time EDT recurring last Sun Oct 2:00 last Sun Mar 3:00
dns server-group DefaultDNS
 domain-name BLAH.local
object-group service W_TCP tcp
 description TCP 3005
 port-object eq 3005
object-group service W_UDP udp
 description UDP 3000 - 3002
 port-object eq 3000
 port-object eq 3001
 port-object eq 3002
access-list outside_1_cryptomap extended permit ip 10.10.5.0 255.255.255.0 host vpn_local 
access-list outside_access_in extended permit tcp any host BLAH_ASA_Outside eq pptp 
access-list outside_access_in remark W UDP Ports 3000 - 3002
access-list outside_access_in extended permit udp any host BLAH_ASA_Outside object-group W_UDP 
access-list outside_access_in remark W TCP Port 3005
access-list outside_access_in extended permit tcp any host BLAH_ASA_Outside object-group W_TCP 
access-list outside_access_in remark VPN ACL
access-list outside_access_in extended permit ip host vpn_local 10.10.5.0 255.255.255.0 
access-list outside_access_in extended permit gre any any 
access-list inside_nat0_outbound extended permit ip 10.10.5.0 255.255.255.0 host vpn_local 
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-611.bin
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 0.0.0.0 0.0.0.0
static (inside,outside) tcp interface pptp FS1 pptp netmask 255.255.255.255 
static (inside,outside) udp interface 3000 W_BASE 3000 netmask 255.255.255.255 
static (inside,outside) udp interface 3001 W_BASE 3001 netmask 255.255.255.255 
static (inside,outside) udp interface 3002 W_BASE 3002 netmask 255.255.255.255 
static (inside,outside) tcp interface 3005 W_BASE 3005 netmask 255.255.255.255 
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 165.228.0.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 uauth 0:05:00 absolute
dynamic-access-policy-record DfltAccessPolicy
http server enable
http 10.10.5.0 255.255.255.0 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 
crypto map outside_map 1 set peer 132.3.9.254 
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 10.10.5.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0
vpdn group global request dialout pppoe
vpdn group global localname USERNAME
vpdn group global ppp authentication chap
vpdn username USERNAME password ********* 
dhcpd auto_config outside
!
dhcpd address 10.10.5.3-10.10.5.33 inside
!

threat-detection basic-threat
threat-detection statistics port
threat-detection statistics protocol
threat-detection statistics access-list
!
class-map inspection_default
 match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
 parameters
  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 pptp 
!
service-policy global_policy global
ntp server 8.8.8.8 source outside prefer
username ROOT password PASSWORD encrypted privilege 15
username ROOT2 password PASSWORD encrypted privilege 15
tunnel-group 132.3.9.254  type ipsec-l2l
tunnel-group 132.3.9.254  ipsec-attributes
 pre-shared-key *
prompt hostname context 
Cryptochecksum:20
: end
share|improve this question
    
Also, since I've started my small fiddlings to fix this issue, the inside, implicit any to any-less-secure rule has now disappeared (ooops!) - any ideas on how to address that issue? - as I mentioned in a previous question, that rule goes away the moment you add an explicit rule for any interface. You must re-create the access rule. E.G. I had an interface that I added outbound ICMP permit rule, and all of a sudden it dropped everything non-ICMP (that was fun to troubleshoot as I was new to ASAs back then - ping was working but actual protocols weren't) –  Mark Henderson May 27 '13 at 7:37
    
Sadly I can't answer your question as your ASAs are on a lower software level than ours and I believe things are quite different from 8.2 onwards –  Mark Henderson May 27 '13 at 7:38
    
Thanks @MarkHenderson - I'm so very confused about the auto delete followed by the need to recreate the any->any-less-secure. I'm still having the issues - packet trace is failing at the very last hurdle, the any any deny ip - the second implicit inside rule. Why is it failing there? –  datakid May 27 '13 at 23:26

2 Answers 2

Your cleanup rule on your inside interface has nothing to do with your issue.

Modern firwalls are statful so you don't need to explicitly allow traffic to go back to the original source.

What you need to do is to allow traffic from ANY to the NATED IP of your server.

access-list outside_access_in extended permit udp any host W_BASE object-group W_UDP

Then do a simple static NAT.

static (inside,outside) interface W_BASE netmask 255.255.255.255

Since you are not forwarding the ports, you can keep your NAT very simple and simply open the correct ports with your ACL.

You could also simplify your service objects like so:

object-group service W_Ports
 service-object tcp eq 3005
 service-object udp range 3000 3002

Then use W_Ports instead of having W_UDP and W_TCP.

Your ACL would then look like this:

access-list outside_access_in extended permit object-group W_Ports any object-group W_BASE

UPDATED version:

access-list outside_access_in extended permit object-group W_UDP any host W_BASE

share|improve this answer
    
Thanks Alex. I've managed to get into the cli and then the config, but now am getting an ERROR: % Invalid Hostname for 'any' on the first command you mention? –  datakid May 27 '13 at 22:45
    
So I tried the second method - create the one service object instead of two, and then the second rule, but I'm getting ERROR: specified object group <W_BASE> not found. But it exists! Not as a network group object, just a plain network object. –  datakid May 27 '13 at 23:06
    
If you have access to the ASDM (https://[IP of Firewall]) I would go through that. It's easier than CLI. As for the errors you are getting, check the updated cli rule I have put in my answer. –  Alex May 28 '13 at 0:54
    
yes I'm using the ASDM (and trying to learn the cli for the router) - it's just hard to wrap my head around the translation of what you write v what to put in since I'm so new. I'm getting there slowly - my understanding of what's going on is increasing. But we still don't seem to have any UDP on port 3000 going out of the network. ie, internally I'm getting UDP builds and the server is logging an InitChannelMsg on port3000 and sends back an InitChannelAck on port 3000 and that's where it dies. So port 3000 isn't making it out of my router –  datakid May 28 '13 at 1:01
    
Also, given that I already have the rule access-list outside_access_in extended permit udp any host BLAH_ASA_Outside object-group W_UDP I don't understand how yours would be superior - especially since the outside-access-in doesn't know about W_BASE? (I am learning, I might be making mistakes, but that's what I'm seeing) –  datakid May 28 '13 at 1:08

Turns out my problem was actually that the server in question, 10.10.5.30, was using the wrong default gateway.

Nothing to do with the ASA 5505.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.