Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

port forwarding on a pix 501

Status
Not open for further replies.

Laylobrown

Technical User
Mar 7, 2007
63
US
Is this good so far? I would like to be able to route access from any outside host that uses port 2100 to a specific internal host.

pix(config)# sho access-list
access-list cached ACL log flows: total 0, denied 0 (deny-flow-max 256)
alert-interval 300
access-list inside_outbound_nat0_acl; 3 elements
access-list inside_outbound_nat0_acl line 1 permit ip 192.168.1.0 255.255.255.0
rockhill 255.255.255.0 (hitcnt=0)
access-list inside_outbound_nat0_acl line 2 permit ip 192.168.1.0 255.255.255.0
spartanburg 255.255.255.0 (hitcnt=105)
access-list inside_outbound_nat0_acl line 3 permit ip 192.168.1.0 255.255.255.0
dispatch 255.255.255.0 (hitcnt=0)
access-list outside_cryptomap_20; 1 elements
access-list outside_cryptomap_20 line 1 permit ip 192.168.1.0 255.255.255.0 rock
hill 255.255.255.0 (hitcnt=0)
access-list outside_cryptomap_40; 1 elements
access-list outside_cryptomap_40 line 1 permit ip 192.168.1.0 255.255.255.0 spar
tanburg 255.255.255.0 (hitcnt=86)
access-list outside_cryptomap_60; 1 elements
access-list outside_cryptomap_60 line 1 permit ip 192.168.1.0 255.255.255.0 disp
atch 255.255.255.0 (hitcnt=0)
access-list outside_access_in; 1 elements
access-list outside_access_in line 1 permit tcp any host 70.43.148.82 eq 2100 (h
itcnt=0)
pix(config)#
 
YOu have this line
access-list outside_access_in line 1 permit tcp any host 70.43.148.82 eq 2100

now add it to the interface
access-group outside_access_in in interface outside

add add a static to connect the internal IP to the external IP

static (inside,outside) tcp 70.43.148.82 2100 [INTERNAL_IP] 2100 netmask 255.255.255.255



Brent
Systems Engineer / Consultant
CCNP, CCSP
 
Okay how does this look

pix(config)# sho access-list
access-list cached ACL log flows: total 0, denied 0 (deny-flow-max 256)
alert-interval 300
access-list inside_outbound_nat0_acl; 3 elements
access-list inside_outbound_nat0_acl line 1 permit ip 192.168.1.0 255.255.255.0
rockhill 255.255.255.0 (hitcnt=24)
access-list inside_outbound_nat0_acl line 2 permit ip 192.168.1.0 255.255.255.0
spartanburg 255.255.255.0 (hitcnt=205)
access-list inside_outbound_nat0_acl line 3 permit ip 192.168.1.0 255.255.255.0
dispatch 255.255.255.0 (hitcnt=0)
access-list outside_cryptomap_20; 1 elements
access-list outside_cryptomap_20 line 1 permit ip 192.168.1.0 255.255.255.0 rock
hill 255.255.255.0 (hitcnt=20)
access-list outside_cryptomap_40; 1 elements
access-list outside_cryptomap_40 line 1 permit ip 192.168.1.0 255.255.255.0 spar
tanburg 255.255.255.0 (hitcnt=172)
access-list outside_cryptomap_60; 1 elements
access-list outside_cryptomap_60 line 1 permit ip 192.168.1.0 255.255.255.0 disp
atch 255.255.255.0 (hitcnt=0)
access-list outside_access_in; 1 elements
access-list outside_access_in line 1 permit tcp interface outside eq 21000 host
GPS_SERVER eq 21000 (hitcnt=0)
pix(config)#

We are hoping to have gps units out in the field to access the server using port 21000 (i got the wrong information earlier).
 
here is the static list

pix(config)# sho static
static (inside,outside) GPS_SERVER GPS_SERVER netmask 255.255.255.255 0 0
pix(config)#
 
Someone take a look at this and tell why the pdm is giving me issues about forwarding port number 21000 to a specific internal ip address? gps_server.

pix(config)# sho run
: Saved
:
PIX Version 6.3(5)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pix
domain-name ambustar.local
clock timezone EST -5
clock summer-time EDT recurring
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
name 192.168.2.0 rockhill
name 192.168.3.0 spartanburg
name 192.168.4.0 dispatch
name 192.168.1.13 GPS_SERVER
access-list inside_outbound_nat0_acl permit ip 192.168.1.0 255.255.255.0 rockhill 255.255.255.0
access-list inside_outbound_nat0_acl permit ip 192.168.1.0 255.255.255.0 spartanburg 255.255.255.0
access-list inside_outbound_nat0_acl permit ip 192.168.1.0 255.255.255.0 dispatch 255.255.255.0
access-list outside_cryptomap_20 permit ip 192.168.1.0 255.255.255.0 rockhill 255.255.255.0
access-list outside_cryptomap_40 permit ip 192.168.1.0 255.255.255.0 spartanburg 255.255.255.0
access-list outside_cryptomap_60 permit ip 192.168.1.0 255.255.255.0 dispatch 255.255.255.0
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside 70.43.148.82 255.255.255.252
ip address inside 192.168.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm location rockhill 255.255.255.0 outside
pdm location 192.168.1.0 255.255.255.0 outside
pdm location spartanburg 255.255.255.0 outside
pdm location spartanburg 255.255.255.0 inside
pdm location dispatch 255.255.255.0 outside
pdm location 70.43.148.82 255.255.255.255 inside
pdm location GPS_SERVER 255.255.255.255 inside
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_outbound_nat0_acl
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
route outside 0.0.0.0 0.0.0.0 70.43.148.81 1
timeout xlate 0:05:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout sip-disconnect 0:02:00 sip-invite 0:03:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto map outside_map 20 ipsec-isakmp
crypto map outside_map 20 match address outside_cryptomap_20
crypto map outside_map 20 set peer 208.104.17.133
crypto map outside_map 20 set transform-set ESP-3DES-MD5
crypto map outside_map 40 ipsec-isakmp
crypto map outside_map 40 match address outside_cryptomap_40
crypto map outside_map 40 set peer 68.115.247.94
crypto map outside_map 40 set transform-set ESP-3DES-MD5
crypto map outside_map 60 ipsec-isakmp
crypto map outside_map 60 match address outside_cryptomap_60
crypto map outside_map 60 set peer 68.115.247.90
crypto map outside_map 60 set transform-set ESP-3DES-MD5
crypto map outside_map interface outside
isakmp enable outside
isakmp key ******** address 208.104.17.133 netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address 68.115.247.94 netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address 24.196.208.52 netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address 68.115.247.90 netmask 255.255.255.255 no-xauth no-config-mode
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
telnet 192.168.1.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
management-access inside
console timeout 0
dhcpd address 192.168.1.3-192.168.1.130 inside
dhcpd dns 64.89.70.2 64.89.74.2
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd auto_config outside
terminal width 80
Cryptochecksum:a4e2505517aa715c8d9d97b99085d2db
: end
pix(config)#
 
The first ACL you posted was correct. You need to follow the format for the static that I posted earlier. You cannot map the IP to itself.

access-list outside_access_in line 1 permit tcp any host 70.43.148.82 eq 2100
access-group outside_access_in line in interface outside
static (inside,outside) tcp 70.43.148.82 2100 GPS_SERVER 2100 netmask 255.255.255.255


Brent
Systems Engineer / Consultant
CCNP, CCSP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top