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
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.
Then do a simple static NAT.
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:
Then use W_Ports instead of having W_UDP and W_TCP.
Your ACL would then look like this:
UPDATED version:
access-list outside_access_in extended permit object-group W_UDP any host W_BASE
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.