Avatar billede troerby Nybegynder
01. april 2011 - 11:26 Der er 6 kommentarer og
1 løsning

CISCO ASA 5505 - Port forward problem

Hej

Håber der er en der kan hjælpe her da vores CISCO er ved, at give mig grå hår og det der er værre :-)

Først lidt baggrund info for at forstå problemet:
Offentlig statisk IP adresse på CISCO'en: 87.61.46.250
LAN 192.168.29.0 / 255.255.255.0
Der er desuden en VPN tunnel til 87.237.152.33 som virker :-)

Jeg har en test server med statisk IP 192.168.29.200 på LAN'et hvor der er en server applikation der lytter på port 50000
Jeg kan ikke få hul igennem fra internettet og ind til denne applikation på trods af, at jeg mener at have lavet NAT og de rigtige access regler :-)

Her er configurationen:

ASA Version 7.2(2)
!
hostname ciscoasa
domain-name mydomain.local
enable password <password> encrypted
names
!
interface Vlan1
nameif inside
security-level 100
ip address 192.168.29.1 255.255.255.0
ospf cost 10
!
interface Vlan2
nameif outside
security-level 0
ip address 87.61.46.250 255.255.255.252
ospf cost 10
!
interface Vlan3
no forward interface Vlan1
nameif dmz
security-level 50
ip address 192.168.3.1 255.255.255.0
ospf cost 10
!
interface Ethernet0/0
switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Ethernet0/4
switchport access vlan 3
!
interface Ethernet0/5
switchport access vlan 3
!
interface Ethernet0/6
switchport access vlan 3
!
interface Ethernet0/7
switchport access vlan 3
!
passwd <password> encrypted
ftp mode passive
clock timezone CEST 1
clock summer-time CEDT recurring last Sun Mar 2:00 last Sun Oct 3:00
dns server-group DefaultDNS
domain-name mydomain.local
object-group network maingate-vpn
description Local LAN
network-object 192.168.29.0 255.255.255.0
object-group network maingate-vpn2
description maingate vpn ip range
network-object 10.252.32.0 255.255.255.192
object-group network Inside
network-object 192.168.29.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.29.0 255.255.255.0 10.252.32.0 255.255.255.192
access-list outside_access_in extended permit ip 10.252.32.0 255.255.255.192 interface inside
access-list outside_access_in extended permit ip host 87.237.152.33 192.168.29.0 255.255.255.0
access-list outside_access_in extended permit ip host 87.237.152.33 host 87.61.46.250
access-list outside_access_in extended permit ip 192.168.29.0 255.255.255.0 10.252.32.0 255.255.255.192
access-list outside_access_in extended permit tcp any host 87.61.46.250 eq 50000
access-list outside_cryptomap_65535.20 extended permit ip 192.168.2.0 255.255.255.0 192.168.3.0 255.255.255.0
access-list outside_cryptomap_65535.20 extended permit ip 192.168.3.0 255.255.255.0 192.168.2.0 255.255.255.0
access-list outside_20_cryptomap extended permit ip 192.168.29.0 255.255.255.0 10.252.32.0 255.255.255.192
access-list outside_20_cryptomap_1 extended permit ip 192.168.29.0 255.255.255.0 10.252.32.0 255.255.255.192
access-list inside_access_in extended permit ip 192.168.29.0 255.255.255.0 10.252.32.0 255.255.255.192
access-list inside_access_in extended permit ip any any
access-list inside_access_out extended permit ip 192.168.29.0 255.255.255.0 10.252.32.0 255.255.255.192
access-list inside_access_out extended permit ip 192.168.29.0 255.255.255.0 any
access-list INSIDE extended permit ip 192.168.29.0 255.255.255.0 host 192.168.29.200
pager lines 24
logging enable
logging monitor debugging
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu dmz 1500
ip local pool vpn-remote 192.168.29.151-192.168.29.199 mask 255.255.255.0
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-522.bin
no asdm history enable
arp timeout 14400
nat-control
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 87.61.46.250 50000 192.168.29.200 50000 netmask 255.255.255.255
access-group inside_access_in in interface inside
access-group inside_access_out out interface inside
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 87.61.46.250 2
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
username admin password .nX1t/CeQmCPhJE0 encrypted privilege 0
username admin attributes
vpn-group-policy DfltGrpPolicy
aaa authentication ssh console LOCAL
aaa authentication telnet console LOCAL
aaa authentication enable console LOCAL
aaa authentication http console LOCAL
aaa authentication serial console LOCAL
http server enable
http 192.168.0.0 255.255.0.0 inside
http 87.104.26.181 255.255.255.255 outside
http 87.237.152.0 255.255.255.0 outside
http 87.104.45.184 255.255.255.255 outside
http 192.168.0.0 255.255.0.0 dmz
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto dynamic-map outside_dyn_map 20 set pfs
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-AES-256-MD5
crypto map outside_map 20 match address outside_20_cryptomap_1
crypto map outside_map 20 set pfs
crypto map outside_map 20 set peer 87.237.152.33
crypto map outside_map 20 set transform-set ESP-AES-256-SHA
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 10
authentication pre-share
encryption aes-256
hash md5
group 2
lifetime 86400
crypto isakmp policy 30
authentication pre-share
encryption 3des
hash md5
group 2
lifetime 86400
crypto isakmp nat-traversal  20
tunnel-group 87.237.152.33 type ipsec-l2l
tunnel-group 87.237.152.33 ipsec-attributes
pre-shared-key *
no vpn-addr-assign aaa
telnet 192.168.0.0 255.255.0.0 inside
telnet 87.237.152.0 255.255.255.0 outside
telnet timeout 5
ssh 192.168.0.0 255.255.0.0 inside
ssh 87.104.45.184 255.255.255.255 outside
ssh 87.237.152.0 255.255.255.0 outside
ssh timeout 5
console timeout 0
dhcpd dns 194.239.134.83 193.162.153.164
dhcpd ping_timeout 750
dhcpd domain mydomain.local
dhcpd auto_config outside vpnclient-wins-override
!
dhcpd address 192.168.29.100-192.168.29.149 inside
dhcpd dns 194.239.134.83 193.162.153.164 interface inside
dhcpd domain mydomain.local interface inside
dhcpd auto_config outside vpnclient-wins-override interface inside
dhcpd enable inside
!
dhcpd address 192.168.3.10-192.168.3.100 dmz
dhcpd dns 194.239.134.83 193.162.153.164 interface dmz
dhcpd enable dmz
!
vpnclient server 87.237.152.33
vpnclient mode network-extension-mode
vpnclient nem-st-autoconnect
vpnclient vpngroup Maingate password ********
!
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
!
service-policy global_policy global
ssl encryption aes256-sha1 3des-sha1 aes128-sha1 des-sha1 rc4-md5
prompt hostname context
no compression svc http-comp
Cryptochecksum:<secret checksum>
: end
asdm image disk0:/asdm-522.bin
no asdm history enable


Mvh Teddy
Avatar billede henrik_meyer Nybegynder
01. april 2011 - 15:12 #1
prøv med følgende:

no access-list outside_access_in extended permit tcp any host 87.61.46.250 eq 50000
no static (inside,outside) tcp 87.61.46.250 50000 192.168.29.200 50000 netmask 255.255.255.255
access-list outside_access_in extended permit tcp any interface outside eq 50000
static (inside,outside) tcp interface outside 50000 192.168.29.200 50000 netmask 255.255.255.255
Avatar billede troerby Nybegynder
01. april 2011 - 21:58 #2
Tak
Jeg har prøvet, men jeg tror ikke det var nok.

Følgende linie gav fejlen "ERROR: % Invalid Hostname"

static (inside,outside) tcp interface outside 50000 192.168.29.200 50000 netmask 255.255.255.255

Jeg fjernede nr. 2 "outside", så giver den ikke fejl og det ser ud til at give den static som var tiltænkt med din line.

Jeg prøvede med packet traceren for at se om jeg kunne finde ud af hvad det går galt.
Se evt. dette link til et screenshot fra http://db.tt/yVQprTH

Har du andre idé'er til hvad der kan gøres?

Mvh Teddy
Avatar billede henrik_meyer Nybegynder
01. april 2011 - 22:05 #3
ja sorry, linierne skal se sådan ud:

access-list outside_access_in extended permit tcp any interface outside eq 50000
static (inside,outside) tcp interface 50000 192.168.29.200 50000 netmask 255.255.255.255

Det skal virke - huskede du at indsætte Access-liste linien?
Avatar billede troerby Nybegynder
01. april 2011 - 22:25 #4
Ja, men nu fik jeg en fejl med "inside_access_out" og jeg tilføjede derfor flg.:

access-list inside_access_out extended permit ip any any

Nu virker indgående på port 50000 ... tak

Men nu ser det ud til, at VPN forbindelsen er gået kold.
Kan disse regler påvirke dette ?

Teddy
Avatar billede troerby Nybegynder
01. april 2011 - 22:33 #5
Jeg har lige checket op på det og den opretter slet ikke VPN tunnel IKE/IPSec længere :-(
Avatar billede troerby Nybegynder
01. april 2011 - 23:37 #6
Det ser ud til, at Henrik Meyer's råd var det der skulle til.
Det virker nu.

Et stort TAK !

Teddy
Avatar billede henrik_meyer Nybegynder
01. april 2011 - 23:44 #7
så lidt
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester