cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2072
Views
0
Helpful
7
Replies

ASA 5506 - single IP (pppoe) port forwarding

Jack-ITP
Beginner
Beginner

Have a client with an ASA 5506 - they have a single public static IP address obtained from the ISP's router through pppoe. I need to allow access through to their mail, web and FTP servers, I've had no issue setting this up on clients with multiple public IP's - set a static route to the internal server IP and set up an access list for the correct ports, if I try the same method here and set a static route from the single public IP to the internal server (also setting the access list for the correct ports) I have outbound traffic but no inbound. If I try and add port forwarding to the network object (internal server) I get an error that the IP address is already in use on the outside interface. Is there any way to configure this with just the single public IP? Thanks.

Jack

1 Accepted Solution

Accepted Solutions

Yes, thats how it's done if the ASA only has one IP assigned on the outside interface.

View solution in original post

7 Replies 7

Karsten Iwen
VIP Mentor VIP Mentor
VIP Mentor

Yes, it's possible. But without seeing your config it's hard to tell what the problem is. In general:

  • Put the port-forwardings in NAT section 2
  • Put the outbound NAT in section 3
  • Allow traffic on the outside ACL based on the real IPs and ports.
  • There is no extra routing involved for the public IP.

Thanks - here is the initial config:

 

ASA Version 9.6(1)
!
hostname ciscoasa
enable password 8Ry2YjIyt7RRXU24 encrypted
names

!
interface GigabitEthernet1/1
 nameif outside
 security-level 0
 pppoe client vpdn group abcd
 ip address pppoe
!
interface GigabitEthernet1/2
 nameif inside
 security-level 100
 ip address 192.168.1.1 255.255.255.0
!
interface GigabitEthernet1/3
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/4
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/5
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/6
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/7
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/8
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Management1/1
 management-only
 no nameif
 no security-level
 no ip address
!
ftp mode passive
object network obj_any
 subnet 0.0.0.0 0.0.0.0
object network obj-192.168.1.200
 host 192.168.1.200
access-list outside_access_in extended permit tcp any object obj-192.168.1.200 eq smtp
access-list outside_access_in extended permit tcp any object obj-192.168.1.200 eq www
access-list outside_access_in extended permit tcp any object obj-192.168.1.200 eq https
access-list outside_access_in extended permit tcp any object obj-192.168.1.200 eq pptp
access-list outside_access_in extended permit tcp any object obj-192.168.1.200 eq 4125
access-list outside_access_in extended permit tcp any object obj-192.168.1.200 eq 47
access-list outside_access_in extended permit tcp any object obj-192.168.1.200 eq ftp
pager lines 24
logging asdm informational
mtu outside 1492
mtu inside 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
!
object network obj_any
 nat (any,outside) dynamic interface
object network obj-192.168.1.200
 nat (any,any) static xx.xx.xx.xx
!
nat (inside,outside) after-auto source dynamic any interface

access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 2xx.xx.xx.xx 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 sctp 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
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
service sw-reset-button
crypto ipsec security-association pmtu-aging infinite
crypto ca trustpool policy
telnet timeout 5
ssh stricthostkeycheck
ssh timeout 5
ssh key-exchange group dh-group1-sha1
console timeout 0
vpdn group abcd request dialout pppoe
vpdn group abcd localname xxx
vpdn group abcd ppp authentication pap
vpdn username xxxx password xxxx

dhcpd auto_config outside
!
dhcpd address 192.168.1.5-192.168.1.254 inside
!
dynamic-access-policy-record DfltAccessPolicy
!
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
Cryptochecksum:b8d3e7e26e332b8614df2da86e252c2a

 

 

First remove the two object-NATs that are configured:

object network obj_any
 no nat (any,outside) dynamic interface
!
object network obj-192.168.1.200
 no nat (any,any) static xx.xx.xx.xx

Then add a new port-forwarding for each service that you need:

object network obj-192.168.1.200-www
 host 192.168.1.200
 nat (inside,outside) static interface service tcp 80 80
!
object network obj-192.168.1.200-smtp
 host 192.168.1.200
 nat (inside,outside) static interface service tcp 25 25
...

And ... PPTP? Really? It's 2017, PPTP is cleartext communication ....

Thanks. I reset the firewall as suggested, we have internet access but we're still not seeing the ports pass through:

 

!
interface GigabitEthernet1/1
 nameif outside
 security-level 0
 pppoe client vpdn group Abc
 ip address pppoe setroute
!
interface GigabitEthernet1/2
 nameif inside
 security-level 100
 ip address 192.168.1.1 255.255.255.0
!
interface GigabitEthernet1/3
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/4
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/5
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/6
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/7
 shutdown
 no nameif
 no security-level
 no ip address
!
interface GigabitEthernet1/8
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Management1/1
 management-only
 no nameif
 no security-level
 no ip address
!
ftp mode passive
object network obj_any
 subnet 0.0.0.0 0.0.0.0
object network obj-http
 host 192.168.1.200
object network obj-https
 host 192.168.1.200
object network obj-smtp
 host 192.168.1.200
object network obj-ftp
 host 192.168.1.200
object network obj-4125
 host 192.168.1.200
access-list outside_access_in extended permit tcp any object obj-smtp eq smtp
access-list outside_access_in extended permit tcp any object obj-https eq https
access-list outside_access_in extended permit tcp any object obj-http eq www
access-list outside_access_in extended permit tcp any object obj-ftp eq ftp
access-list outside_access_in extended permit tcp any object obj-4125 eq 4125
pager lines 24
logging asdm informational
mtu outside 1492
mtu inside 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
!
object network obj-http
 nat (inside,outside) static 63.xx.xx.xx service tcp http http
object network obj-https
 nat (inside,outside) static 63.xx.xx.xx service tcp https https
object network obj-smtp
 nat (inside,outside) static 63.xx.xx.xx service tcp smtp smtp
object network obj-ftp
 nat (inside,outside) static 63.xx.xx.xx service tcp ftp ftp
object network obj-4125
 nat (inside,outside) static 63.xx.xx.xx service tcp 4125 4125
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 207.xx.xx.xx 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 sctp 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
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
service sw-reset-button
crypto ipsec security-association pmtu-aging infinite
crypto ca trustpool policy
telnet timeout 5
ssh stricthostkeycheck
ssh timeout 5
ssh key-exchange group dh-group1-sha1
console timeout 0
vpdn group Abc request dialout pppoe
vpdn group Abc localname xxx
vpdn group Abc ppp authentication pap
vpdn username xxx

dhcpd auto_config outside
!
dhcpd address 192.168.1.5-192.168.1.254 inside
!
dynamic-access-policy-record DfltAccessPolicy
!
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
Cryptochecksum:6b6f1dc7877deb0cc3407e8494ab9434
: end

The IP should be replaced with the keyword "interface".

Simulate it with packet-tracer and post the result:

ASA#packet-tracer input outside tcp 1.2.3.4 1234 63.xx.xx.xx 80

So the command should be:

object network obj-http
 nat (inside,outside) static interface service tcp http http?

 

Thanks for your help - it will be tomorrow before we can reconnect it at the client site and I'll post the result for you.

Yes, thats how it's done if the ASA only has one IP assigned on the outside interface.

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:

Recognize Your Peers