cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10155
Views
0
Helpful
15
Replies

Access Public IP Address Internally

webmike10
Level 1
Level 1

Hi,

I am configuring a 5506-x for the first time. Without the firewall installed, staff currently access a remote desktop machine internally using the public IP address.  I have it configured so workstations internally can access the server in DMZ 172.16.20.20 and from the outside.  

However, for the life of me, I can not get it configured to allow somebody on the GUEST interface or the INTERNAL interface to access the public IP 184.188.4.x. 

Alternatively, I can have the staff access the remote app using the DMZ server IP 172.16.0.20 but it would require me to reconfigure 10 mobile devices laptops of the staff with two separate remote connections (one with the public IP address to use when outside of the network and another to use internally).  What NAT rule would be applied to allow clients on the LAN to access the public IP address:3389? 

Thank you 

1 Accepted Solution

Accepted Solutions

Hi,

This should do the trick for you:

nat (Guest,dmz) 1 source static any any destination static 184.188.4.x Internet_RDP service RDP_TCP RDP_TCP
nat (Internal,dmz) 2 source static any any destination static 184.188.4.x Internet_RDP service RDP_TCP RDP_TCP

I reused the Internet_RDP object for the real server but you can come up with a new one of you want to.

Also, not sure if the static NAT entry shown in your configuration is still in place, if it is make you you remove it:

*nat (dmz,Guest) source dynamic any interface destination static obj-host-184.188.4.x obj-host-172.16.20.20*

HTH
__ __
Pablo

View solution in original post

15 Replies 15

MANI .P
Level 1
Level 1

Hi ,

I understand that , You have a server at DMZ  172.16.20.20 that has been 184.188.4.x. nat to outside for RDP access . so outside user will access your DMZ  172.16.20.20 & your internal user traffic has to go directly to DMZ 172.16.20.20 .

This is your are looking for ?

Thanks,

Mani.

Looking for internal user to access OUTSIDE  184.188.4.x. on port 3389 

Hi ,

object network Guest_nw
subnet 172.16.30.0 255.255.255.0

Object network 184.188.4.x
host 184.188.4.x

object service RDP_TCP
service tcp destination eq 3389

nat ( guest , outside ) source dynamic Guest_nw interface destnation 184.188.4.x 184.188.4.x service RDP_TCP RDP_TCP

make sure this will be NAT ordered  in line 1 .

#access-list Guest_access_in_1  extended permit tcp host 184.188.4.x  172.16.30.0 255.255.255.0 eq 3389

also ensure the Access-list in line 1 .

so , Guest network users will do only RDP to outside network 184.188.4.X .

Rate  this if helps you .

thanks,

Mani.

I get an error when executing

nat ( guest , outside ) source dynamic Guest_nw interface destination 184.188.4.x 184.188.4.x service RDP_TCP RDP_TCP

 

nat ( guest , outside ) source dynamic Guest_nw interface destnation 184.188.4.2     ^ 184.188.4.2 service RDP_TCP RDP_TCP

 

ERROR: % Invalid input detected at '^' marker.

Hi,

This should do the trick for you:

nat (Guest,dmz) 1 source static any any destination static 184.188.4.x Internet_RDP service RDP_TCP RDP_TCP
nat (Internal,dmz) 2 source static any any destination static 184.188.4.x Internet_RDP service RDP_TCP RDP_TCP

I reused the Internet_RDP object for the real server but you can come up with a new one of you want to.

Also, not sure if the static NAT entry shown in your configuration is still in place, if it is make you you remove it:

*nat (dmz,Guest) source dynamic any interface destination static obj-host-184.188.4.x obj-host-172.16.20.20*

HTH
__ __
Pablo

Thank you for all the responses.  Pablo, yours did the trick!  Much appreciated! 

Just so I get this straight, the client is attempting to connect to the public IP address from Guest or Inside network. If I implement this NAT solution, what I see is the traffic never really hits the outside IP of the firewall. The public IP in the client outbound request is just getting translated to the DMZ or internal IP address. So an ACL must permit this traffic from say the Guest network to the inside or DMZ. Is that correct?

 

Thanks

Here i have give you model .

to create object for guest network

#object network Guest_NW

#subnet 172.16.30.0 255.255.255.0

to create object for guest to access rdp from outside network .

#object network Outside_host

#host 184.188.4.X

to create service policy for RDP

#object service RDP_TCP
#service tcp destination eq 3389

#nat ( guest , outside ) source dynamic Guest_nw interface destination Outside_host Outside_host service RDP_TCP RDP_TCP

#access-list Guest_access_in_1  extended permit tcp host 184.188.4.x  172.16.30.0 255.255.255.0 eq 3389

also ensure the Access-list in line 1 .

Thanks,

Mani

There is still a confusion. Please let me know if the below is correct:

you would like to access the dmz server 172.16.20.20 on its public ip address 184.188.4.x from uers located behind guest interface. So, essentially, the server 184.188.4.x is physically present behind dmz as 172.16.20.20. Please confirm.

Also, There are few weird looking NAT statements which we need to remove/modify which we can check after confirming the requirement here.

HTH
-
AJ

Yes, I have the same question

I have local server setup with private IP address 192.168.1.50 this local server protected by the ASA CISCO 5506-x firewall.

I need all external users get access to my local server by using this public IP 50.77.224.57.

That's mean when external user type 50.77.224.57 in their browser they should get access to my local server which it has private IP 192.168.1.50

Does anyone know how to implement that by using ASA CISCO 5506-x?

Ajay Saini
Level 7
Level 7

Hello,

Please attach a running configuration of the existing setup. The requirement should be fairly simple to achieve using NAT statement. Please attach a show run output and also specify requirements in bullet points.

-

AJ

Thanks for the response.  

The config is below.  Essentially to allow

  • Guest (nameif Guest / ip address 172.16.30.1 255.255.255.0) access to External Public IP (nameif Outside / ip address 184.188.4.x.) on port 3389.  

Config:

Result of the command: "show running-config"


: Hardware: ASA5506, 4096 MB RAM, CPU Atom C2000 series 1250 MHz, 1 CPU (4 cores)
:
ASA Version 9.3(2)2
!
hostname CCC-FW-01
domain-name ccc.battlefieldblvd.org
enable password Jo0j3TGhpkUt.EFg encrypted
names
ip local pool VPN_Sessions_Pool 10.10.255.1-10.10.255.10 mask 255.255.255.240
!
interface GigabitEthernet1/1
nameif outside
security-level 0
ip address dhcp setroute
!
interface GigabitEthernet1/2
shutdown
no nameif
security-level 100
ip address 172.16.50.1 255.255.255.0
!
interface GigabitEthernet1/3
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/4
nameif PointtoPoint
security-level 100
ip address 172.16.1.2 255.255.255.252
!
interface GigabitEthernet1/5
channel-group 1 mode on
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/6
channel-group 1 mode on
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/7
channel-group 1 mode on
no nameif
no security-level
no ip address
!
interface GigabitEthernet1/8
channel-group 1 mode on
no nameif
no security-level
no ip address
!
interface Management1/1
management-only
nameif management
security-level 100
ip address 172.16.40.1 255.255.255.0
!
interface Port-channel1
lacp max-bundle 8
port-channel load-balance src-dst-ip-port
nameif Port-channel1
security-level 0
no ip address
!
interface Port-channel1.1
vlan 10
nameif internal
security-level 100
ip address 172.16.10.1 255.255.255.0
!
interface Port-channel1.20
description Server Access VLAN
vlan 20
nameif dmz
security-level 50
ip address 172.16.20.1 255.255.255.0
!
interface Port-channel1.30
description Wifi and Clincians Access VLAN
vlan 30
nameif Guest
security-level 0
ip address 172.16.30.1 255.255.255.0
!
ftp mode passive
clock timezone EST -5
clock summer-time EDT recurring
dns domain-lookup outside
dns domain-lookup PointtoPoint
dns domain-lookup management
dns domain-lookup Port-channel1
dns domain-lookup internal
dns domain-lookup dmz
dns domain-lookup Guest
dns server-group DefaultDNS
domain-name ccc.battlefieldblvd.org
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network ccc-server
host 172.16.20.20
description Inside-Server
object network Private_Class_A
subnet 10.0.0.0 255.0.0.0
object network Private_Class_B
subnet 172.16.0.0 255.240.0.0
object network Private_Class_C
subnet 192.168.0.0 255.255.0.0
object network Printer
host 172.16.30.30
object service rdp
service tcp source eq 3389 destination eq 3389
object service 3389
service tcp destination eq 3389
description 3389
object network Outside
host184.188.4.x
object network internet
subnet 184.188.4.0 255.255.255.0
object network interneta
host 184.188.4.x
object network Internet_RDP
host 172.16.20.20
object network Outside_RDP
host 172.16.20.20
object network RDPOutside
host 184.188.4.x
object network PORT-FORWARD
host 172.16.20.20
object network INSIDE-OUT
host 184.188.4.x
object network obj-host-172.16.20.20
host 172.16.20.20
object network obj-host-184.188.4.x
host 184.188.4.x
object network outsidea
host 184.188.4.x
object network inside-subnet
subnet 172.16.10.0 255.255.255.0
object network dmz-subnet
subnet 172.16.20.0 255.255.255.0
object-group service DM_INLINE_SERVICE_1
service-object icmp
service-object tcp destination eq 3389
object-group network Private-Networks
network-object object Private_Class_A
network-object object Private_Class_B
network-object object Private_Class_C
object-group protocol IP-ICMP
protocol-object ip
protocol-object icmp
object-group protocol DM_INLINE_PROTOCOL_1
protocol-object ip
protocol-object icmp
access-list dmz_access_in remark Outbound traffic to LAN
access-list dmz_access_in extended permit tcp 172.16.20.0 255.255.255.0 172.16.30.0 255.255.255.0 eq 3389 inactive
access-list dmz_access_in remark Allow rdp traffic to server from front office
access-list dmz_access_in extended permit tcp 172.16.10.0 255.255.255.0 object ccc-server eq 3389 inactive
access-list dmz_access_in remark Allow rdp to server from clinicans fffice and WIFI
access-list dmz_access_in extended permit tcp 172.16.30.0 255.255.255.0 object ccc-server eq 3389 inactive
access-list dmz_access_in extended permit tcp any 172.16.1.0 255.255.255.0 eq ssh
access-list dmz_access_in remark Block all traffic to private networks
access-list dmz_access_in extended deny object-group IP-ICMP any object-group Private-Networks
access-list dmz_access_in remark Permit traffic to internet
access-list dmz_access_in extended permit ip 172.16.20.0 255.255.255.0 any
access-list Guest_access_in extended deny ip any 172.16.1.0 255.255.255.0
access-list Guest_access_in extended permit ip 172.16.30.0 255.255.255.0 any inactive
access-list Guest_access_in_1 remark Allow access from offices & wifi to server
access-list Guest_access_in_1 extended permit object-group DM_INLINE_SERVICE_1 172.16.30.0 255.255.255.0 object ccc-server
access-list Guest_access_in_1 remark Allow access from offices and wifi to printer
access-list Guest_access_in_1 extended permit object-group DM_INLINE_PROTOCOL_1 172.16.30.0 255.255.255.0 object Printer
access-list Guest_access_in_1 remark Block all traffic to private networks
access-list Guest_access_in_1 extended deny object-group IP-ICMP any object-group Private-Networks
access-list Guest_access_in_1 remark Allow access to Internet
access-list Guest_access_in_1 extended permit ip 172.16.30.0 255.255.255.0 any
access-list outside_access_in remark Remote access to DMZ server on port 3389
access-list outside_access_in extended permit object 3389 any object Internet_RDP
access-list outside_access_in extended permit object 3389 object obj-host-172.16.20.20 object obj-host-184.188.4.x inactive
access-list outside_access_in extended deny object-group IP-ICMP any any
access-list outside_cryptomap extended permit ip 172.16.10.0 255.255.255.0 192.168.13.0 255.255.255.0
pager lines 24
logging enable
logging asdm informational
no logging message 302015
no logging message 302016
mtu outside 1500
mtu PointtoPoint 1500
mtu management 1500
mtu Port-channel1 1500
mtu internal 1500
mtu dmz 1500
mtu Guest 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
nat (dmz,Guest) source dynamic any interface destination static obj-host-184.188.4.x obj-host-172.16.20.20
!
object network PORT-FORWARD
nat (dmz,outside) static interface service tcp 3389 3389
object network INSIDE-OUT
nat (dmz,Guest) static 172.16.20.20 service tcp 3389 3389
object network obj-host-184.188.4.x
nat (Guest,outside) static obj-host-172.16.20.20
object network outsidea
nat (dmz,outside) static 172.16.20.20
object network inside-subnet
nat (internal,outside) dynamic interface
object network dmz-subnet
nat (dmz,outside) dynamic interface
!
nat (internal,outside) after-auto source dynamic any interface
nat (internal,dmz) after-auto source dynamic any interface
nat (dmz,outside) after-auto source dynamic any interface
nat (Guest,outside) after-auto source dynamic any interface
nat (Guest,dmz) after-auto source dynamic any interface
nat (management,internal) after-auto source dynamic any interface inactive
access-group outside_access_in in interface outside
access-group dmz_access_in in interface dmz
access-group Guest_access_in_1 in interface Guest
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
user-identity default-domain LOCAL
aaa authentication http console LOCAL
aaa authentication ssh console LOCAL
http server enable
http 172.16.20.0 255.255.255.0 dmz
http 0.0.0.0 0.0.0.0 management
http 172.16.10.0 255.255.255.0 internal
no snmp-server location
no snmp-server contact
service sw-reset-button
crypto ipsec ikev1 transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-DES-SHA esp-des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-SHA-TRANS esp-aes esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-SHA-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-AES-128-MD5-TRANS esp-aes esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-MD5-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-AES-192-SHA-TRANS esp-aes-192 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-SHA-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-AES-192-MD5-TRANS esp-aes-192 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-MD5-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-AES-256-SHA-TRANS esp-aes-256 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-256-SHA-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-AES-256-MD5-TRANS esp-aes-256 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-256-MD5-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-3DES-SHA-TRANS esp-3des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-3DES-SHA-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-3DES-MD5-TRANS esp-3des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-3DES-MD5-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-DES-SHA-TRANS esp-des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-DES-SHA-TRANS mode transport
crypto ipsec ikev1 transform-set ESP-DES-MD5-TRANS esp-des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-DES-MD5-TRANS mode transport
crypto ipsec security-association pmtu-aging infinite
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set ikev1 transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
crypto map outside_map 1 match address outside_cryptomap
crypto map outside_map 1 set pfs
crypto map outside_map 1 set peer 166.249.84.7
crypto map outside_map 1 set ikev1 transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map outside_map interface outside
crypto ca trustpool policy
crypto ikev2 policy 1
encryption aes-256
integrity sha
group 5 2
prf sha
lifetime seconds 86400
crypto ikev2 policy 10
encryption aes-192
integrity sha
group 5 2
prf sha
lifetime seconds 86400
crypto ikev2 policy 20
encryption aes
integrity sha
group 5 2
prf sha
lifetime seconds 86400
crypto ikev2 policy 30
encryption 3des
integrity sha
group 5 2
prf sha
lifetime seconds 86400
crypto ikev2 policy 40
encryption des
integrity sha
group 5 2
prf sha
lifetime seconds 86400
crypto ikev1 enable outside
crypto ikev1 policy 10
authentication crack
encryption aes-256
hash sha
group 2
lifetime 86400
crypto ikev1 policy 20
authentication rsa-sig
encryption aes-256
hash sha
group 2
lifetime 86400
crypto ikev1 policy 30
authentication pre-share
encryption aes-256
hash sha
group 2
lifetime 86400
crypto ikev1 policy 40
authentication crack
encryption aes-192
hash sha
group 2
lifetime 86400
crypto ikev1 policy 50
authentication rsa-sig
encryption aes-192
hash sha
group 2
lifetime 86400
crypto ikev1 policy 60
authentication pre-share
encryption aes-192
hash sha
group 2
lifetime 86400
crypto ikev1 policy 70
authentication crack
encryption aes
hash sha
group 2
lifetime 86400
crypto ikev1 policy 80
authentication rsa-sig
encryption aes
hash sha
group 2
lifetime 86400
crypto ikev1 policy 90
authentication pre-share
encryption aes
hash sha
group 2
lifetime 86400
crypto ikev1 policy 100
authentication crack
encryption 3des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 110
authentication rsa-sig
encryption 3des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 120
authentication pre-share
encryption 3des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 130
authentication crack
encryption des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 140
authentication rsa-sig
encryption des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 150
authentication pre-share
encryption des
hash sha
group 2
lifetime 86400
telnet timeout 5
no ssh stricthostkeycheck
ssh 172.16.10.0 255.255.255.0 internal
ssh timeout 60
ssh version 2
ssh key-exchange group dh-group1-sha1
console timeout 15
no vpn-addr-assign dhcp
no ipv6-vpn-addr-assign aaa
no ipv6-vpn-addr-assign local
dhcp-client client-id interface outside
dhcpd address 172.16.10.10-172.16.10.20 internal
dhcpd dns 8.8.8.8 8.8.4.4 interface internal
dhcpd lease 604800 interface internal
dhcpd option 3 ip 172.16.10.1 interface internal
dhcpd enable internal
!
dhcpd address 172.16.20.20-172.16.20.20 dmz
dhcpd dns 8.8.8.8 8.8.4.4 interface dmz
dhcpd lease 1048575 interface dmz
dhcpd option 3 ip 172.16.20.1 interface dmz
dhcpd enable dmz
!
dhcpd address 172.16.30.30-172.16.30.50 Guest
dhcpd dns 8.8.8.8 8.8.4.4 interface Guest
dhcpd lease 86400 interface Guest
dhcpd option 3 ip 172.16.30.1 interface Guest
dhcpd enable Guest
!
threat-detection basic-threat
threat-detection statistics
threat-detection statistics tcp-intercept rate-interval 30 burst-rate 400 average-rate 200
dynamic-filter updater-client enable
dynamic-filter enable interface outside
dynamic-filter drop blacklist interface outside
group-policy DfltGrpPolicy attributes
vpn-tunnel-protocol ikev1 ssl-clientless
group-policy GroupPolicy1 internal
group-policy GroupPolicy1 attributes
vpn-tunnel-protocol ikev1
group-policy VPN_IT internal
group-policy VPN_IT attributes
vpn-idle-timeout 5
vpn-session-timeout none
vpn-tunnel-protocol ikev1
dynamic-access-policy-record DfltAccessPolicy
dynamic-access-policy-record VPN_IT_DAP
description "Information Technology VPN Access"
priority 1
username mike.griffin password OoaeDIDEu33lt1pl encrypted privilege 15
tunnel-group CCCIT type remote-access
tunnel-group CCCIT general-attributes
address-pool VPN_Sessions_Pool
password-management password-expire-in-days 7
tunnel-group CCCIT ipsec-attributes
ikev1 pre-shared-key *****
tunnel-group 166.249.84.7 type ipsec-l2l
tunnel-group 166.249.84.7 general-attributes
default-group-policy GroupPolicy1
tunnel-group 166.249.84.7 ipsec-attributes
ikev1 pre-shared-key *****
!
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
inspect icmp
inspect icmp error
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
hpm topN enable
Cryptochecksum:9554744cd0294d85e1b16467db4b0cd0
: end

What you are looking for is DNS re-write.  Just add the dns keyword to the end of your NAT statement but then also make sure that if the server / PC is located on another interface on the ASA that you allow the traffic to the private IP in the access list.

But if you are accessing the IP directly and not via a FQDN then you can use the NAT suggestion further up in this post.

--

Please remember to select a correct answer and rate helpful posts

--
Please remember to select a correct answer and rate helpful posts

behind which NAT statement? 

Review Cisco Networking products for a $25 gift card