cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2379
Views
0
Helpful
6
Replies

3389 port allowed from some IP's on ASA 5505

Tim Roelands
Level 1
Level 1

Hi!

I would like to setup an cisco ASA 5505 to only allow certain IP's on port 3389, but i can't get it to work. Maybe some of you experts know why?

Here is my config:

ASA Version 8.4(3)
!
hostname cisco-asa
enable password ** encrypted
passwd ** encrypted
names
!
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
!
interface Vlan1
nameif inside
security-level 100
ip address 192.168.1.253 255.255.255.0
!
interface Vlan2
nameif outside
security-level 0
ip address 95.*.*.* 255.255.255.248
!
ftp mode passive
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network rdpuser-1
host 46.*.*.*
object network rdpuser-2
host 48.*.*.*
object network rdp-host-pc
host 192.168.1.20
object service newRDP
service tcp destination eq 3389
object network internal_RDS_NAT
host 192.168.1.20
object-group network rdp-group
network-object object rdpuser-1
network-object object rdpuser-2
access-list outside_access_in extended permit object newRDP object-group rdp-group object rdp-host-pc
pager lines 24
logging asdm informational
mtu outside 1500
mtu inside 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
!
object network obj_any
nat (inside,outside) dynamic interface
object network internal_RDS_NAT
nat (inside,outside) static interface service tcp 3389 3389
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 95.*.*.*
1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
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
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
client-update enable
telnet timeout 5
ssh timeout 5
console timeout 0

dhcpd auto_config outside
!
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

          

The allowed IP's are setup on user level (rdpuser-1 and rdpuser-2) .

Still do, I can't connect to the server from any of these IP's...

6 Replies 6

Maykol Rojas
Cisco Employee
Cisco Employee

Hello Tim,

Mike here, This is incorrect:

object service newRDP

service tcp destination eq 3389

Please change it to

object service newRDP

service tcp source eq 3389

Try it out and let me know.

Mike

Mike

Hi Maykol!

No go after changing the rule. It was a bit of a ride because at first I could not delete the object (before creating a new one), because the object was in use...but after some puzzling, this is what I made from it. But still no go...

hostname cisco-asa
enable password ** encrypted
passwd ** encrypted
names
!
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
!
interface Vlan1
nameif inside
security-level 100
ip address 192.168.1.253 255.255.255.0
!
interface Vlan2
nameif outside
security-level 0
ip address 95.*.*.* 255.255.255.248
!
ftp mode passive
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network rdpuser-1

host 46.*.*.*
object network rdpuser-2
host 48.*.*.*
object network rdp-host-pc
host 192.168.1.20
object service newRDP
service tcp source eq 3389
object network internal_RDS_NAT
host 192.168.1.20
object-group network rdp-group
network-object object rdpuser-1
network-object object rdpuser-2
access-list outside_access_in extended permit object newRDP object-group rdp-group object rdp-host-pc
pager lines 24
logging asdm informational
mtu outside 1500
mtu inside 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
!
object network obj_any
nat (inside,outside) dynamic interface
object network internal_RDS_NAT
nat (inside,outside) static interface service tcp 3389 3389
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 95.97.209.217 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
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
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
client-update enable
telnet timeout 5
ssh timeout 5
console timeout 0

dhcpd auto_config outside
!
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

Thanks in advance!

I see,

Now we have another problem since the PAT will hit first, try the following:

object network obj_any

no nat (inside,outside) dynamic interface

nat (inside,outside) after-auto source dynamic network obj_any interface

It may cause loss of connectivty while you do the changes.

Mike

Mike

Hi Maykol,

I'm sorry, this is what happened:

cisco-asa(config)# object network obj_any

cisco-asa(config-network-object)# no nat (inside,outside) dynamic interface

cisco-asa(config-network-object)# nat (inside,outside) after-auto source dynamic network obj_any interface

ERROR: network doesn't match an existing object or object-group

Hi,

Sorry, there is a network keyword there. I must put it there by mistake.

nat (inside,outside) after-auto source dynamic obj_any interface

There. Try it out.

Mike

Mike

Sorry, still no go Maykol....The command works, but I still can't get any connection to de RDS...

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card