• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1690
  • Last Modified:

Open Cisco FTP port on ASA CLI

Hi,I have a very basic question on Cisco ASA. Using CLI, how can I open port 21 from IP Outside to 192.168.254.9 (Inside FTP server)

So that the port is not blocked, and traffic can flow from the internet to the FTP server.
0
itheco
Asked:
itheco
  • 8
  • 4
  • 3
  • +1
1 Solution
 
Istvan KalmarCommented:
Hi,

Please refer this page howto:

http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a008046f31a.shtml#s11


If you have more information pplase show us your config, and we help you!

Best regards,
Istvan
0
 
iferizemCommented:
it would be: adding an ACL
"
ftp mode passive
access-list ACL-Inbound extended permit udp host x.x.x.x host y.y.y.y eq syslog
"
where x.x.x.x is the source and y.y.y.y is the destination
0
 
ithecoAuthor Commented:
could the scource be the ip provided by the isp? But what about the ports? I do not want ALL traffic, to go to the ftp server...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Alexey KomarovChief Project EngineerCommented:
Hi
static (inside,internet) tcp interface ftp 192.168.254.9 ftp netmask 255.255.255.255
access-list outside-in extended permit tcp any host x.x.x.x eq ftp

Issue the policy-map global_policy command.

ASAwAIP-CLI(config)#policy-map global_policy
Issue the class inspection_default command.

ASAwAIP-CLI(config-pmap)#class inspection_default
Issue the inspect FTP command.

ASAwAIP-CLI(config-pmap-c)#inspect FTP


http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a00807ee585.shtml
0
 
ithecoAuthor Commented:
I relly have problemt understading the commands? and this dose not workd "static (inside,internet) tcp interface ftp 192.168.254.9 ftp netmask 255.255.255.255"
0
 
Istvan KalmarCommented:
please show us the config... it seems that you use different names of interfaces!
0
 
Alexey KomarovChief Project EngineerCommented:
inside - name your internal interface
internet - name your external (outside) interface

0
 
ithecoAuthor Commented:
elnet 192.168.254.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd auto_config outside
!
dhcpd address 192.168.254.251-192.168.254.254 inside
!

!
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
webvpn
 enable outside
 url-list Server "Terminalserver" http://192.168.254.7 1
group-policy DfltGrpPolicy attributes
 banner none
 wins-server none
 dns-server none
 dhcp-network-scope none
 vpn-access-hours none
 vpn-simultaneous-logins 3
 vpn-idle-timeout 30
 vpn-session-timeout none
 vpn-filter none
 vpn-tunnel-protocol IPSec l2tp-ipsec webvpn
 password-storage disable
 ip-comp disable
 re-xauth disable
 group-lock none
 pfs disable
 ipsec-udp disable
 ipsec-udp-port 10000
 split-tunnel-policy tunnelall
 split-tunnel-network-list none
 default-domain none
 split-dns none
 intercept-dhcp 255.255.255.255 disable
 secure-unit-authentication disable
 user-authentication disable
 user-authentication-idle-timeout 30
 ip-phone-bypass disable
 leap-bypass disable
 nem disable
 backup-servers keep-client-config
 msie-proxy server none
 msie-proxy method no-modify
 msie-proxy except-list none
 msie-proxy local-bypass disable
 nac disable
 nac-sq-period 300
 nac-reval-period 36000
 nac-default-acl none
 address-pools none
 smartcard-removal-disconnect enable
 client-firewall none
 client-access-rule none
 webvpn
  functions url-entry file-access file-entry file-browsing mapi port-forward aut
o-download
  html-content-filter none
  homepage none
  keep-alive-ignore 4
  http-comp gzip
  filter none
  url-list none
  customization value DfltCustomization
  port-forward none
  port-forward-name value Application Access
  sso-server none
  deny-message value Login was successful, but because certain criteria have not
 been met or due to some specific group policy, you do not have permission to us
e any of the VPN features. Contact your IT administrator for more information
  svc none
  svc keep-installer installed
  svc keepalive none
  svc rekey time none
  svc rekey method none
  svc dpd-interval client none
  svc dpd-interval gateway none
  svc compression deflate
group-policy GroupPolicy1 internal
group-policy GroupPolicy1 attributes
 vpn-tunnel-protocol IPSec l2tp-ipsec webvpn
 webvpn
  functions url-entry file-access file-entry file-browsing
group-policy clientvpn internal
group-policy clientvpn attributes
 wins-server value 192.168.254.6
 dns-server value 192.168.254.6
 vpn-tunnel-protocol IPSec
 split-tunnel-policy tunnelspecified
 split-tunnel-network-list value clientvpn_splitTunnelAcl
 default-domain value sbdomain.local
 nac enable
group-policy firmavpn internal
group-policy firmavpn attributes
 wins-server value 192.168.254.6
 dns-server value 192.168.254.6
 vpn-idle-timeout none
 vpn-tunnel-protocol IPSec
 split-tunnel-network-list value clientvpn_splitTunnelAcl
 default-domain value sbdomain.local
 nac enable


tunnel-group DefaultWEBVPNGroup webvpn-attributes
 nbns-server xxx xxx xxx xxx master timeout 2 retry 2
tunnel-group xxx xxx xxx xxx type ipsec-l2l
tunnel-group xxx xxx xxx xxx ipsec-attributes
 pre-shared-key *
tunnel-group firmavpn type ipsec-ra
tunnel-group firmavpn general-attributes
 address-pool VPNPool
 default-group-policy firmavpn
tunnel-group firmavpn ipsec-attributes
 pre-shared-key *
tunnel-group xxx xxx xxx xxx type ipsec-l2l
tunnel-group xxx xxx xxx xxx ipsec-attributes
 pre-shared-key *
prompt hostname context
Cryptochecksum:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
: end
0
 
ithecoAuthor Commented:
: Saved
:
ASA Version 7.2(3)
!
hostname gateway
domain-name sbdomain.local
enable password 8.xxxxxxx encrypted
names
name xxxxxxxxxxxxxx FIRSTCOM
name xxxxxxxxxxxxxxxxxxx IPTLFBOX
name xxxxxxxxxxxxxxx ITG
name xxxxxxxxxxxxxxxxxx MosevejIP
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 192.168.254.250 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address MosevejIP 255.255.255.252
!
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
!
passwd xxxxxxxxxxxxxxxxxxxxxxxxxx encrypted
ftp mode passive
dns server-group DefaultDNS
 domain-name sbdomain.local
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
object-group network Nsales
 network-object host xxxxxxxxxxxxxxxx
 network-object host xxxxxxxxxxxxxxx
access-list outside_access_in_1 extended permit tcp host xxxxxxxxxxxxxxxxx host Mo
sevejIP eq 3389
access-list outside_access_in_1 extended permit tcp any host MosevejIP eq 4125
access-list outside_access_in_1 extended permit tcp any host MosevejIP eq smtp
access-list outside_access_in_1 extended permit tcp any host MosevejIP eq https

access-list outside_access_in_1 extended permit udp any host MosevejIP eq 4569
access-list outside_access_in_1 extended permit tcp host FIRSTCOM host MosevejIP
 eq 2220
access-list outside_access_in_1 extended permit tcp host ITG host MosevejIP eq 2
220
access-list outside_access_in_1 extended permit tcp any host MosevejIP eq ssh
access-list outside_1_cryptomap extended permit ip 192.168.254.0 255.255.255.0 1
92.168.251.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.254.0 255.255.255.0
192.168.251.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.254.0 255.255.255.0
192.168.252.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 10.1.1.0 255.255.255.0 10.1.
1.0 255.255.255.192
access-list inside_nat0_outbound extended permit ip any 192.168.254.0 255.255.25
5.192
access-list clientvpn_splitTunnelAcl standard permit 192.168.254.0 255.255.255.0

access-list outside_cryptomap_1 extended permit ip 192.168.254.0 255.255.255.0 1
92.168.251.0 255.255.255.0
access-list outside_cryptomap_2 extended permit ip 192.168.254.0 255.255.255.0 1
92.168.252.0 255.255.255.0
access-list outside_cryptomap_3 extended permit ip 192.168.254.0 255.255.255.0 1
92.168.252.0 255.255.255.0
access-list outside_cryptomap_4 extended permit ip 192.168.254.0 255.255.255.0 1
92.168.252.0 255.255.255.0
access-list outside_access_in extended permit tcp any interface outside eq ftp
access-list outside_access_in extended permit tcp any interface outside eq ftp-d
ata
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
ip local pool VPNPool 192.168.254.30-192.168.254.50
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-523.bin
no asdm history enable
arp timeout 14400
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 interface 3389 192.168.254.7 3389 netmask 255.255.25
5.255
static (inside,outside) tcp interface 4125 192.168.254.6 4125 netmask 255.255.25
5.255
static (inside,outside) udp interface 4569 IPTLFBOX 4569 netmask 255.255.255.255

static (inside,outside) tcp interface smtp 192.168.254.6 smtp netmask 255.255.25
5.255
static (inside,outside) tcp interface https 192.168.254.6 https netmask 255.255.
255.255
static (inside,outside) tcp interface www 192.168.254.6 www netmask 255.255.255.
255
static (inside,outside) tcp interface ssh 192.168.254.8 ssh netmask 255.255.255.
255
static (inside,outside) tcp interface 2220 IPTLFBOX ssh netmask 255.255.255.255

access-group outside_access_in_1 in interface outside
route outside 0.0.0.0 0.0.0.0 188.179.23.161 1
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
aaa-server termsrv protocol ldap
http server enable
http 192.168.254.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto dynamic-map outside_dyn_map 20 set pfs
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-SHA
crypto dynamic-map outside_dyn_map 40 set pfs
crypto dynamic-map outside_dyn_map 40 set transform-set ESP-3DES-SHA
crypto map outside_map 1 match address outside_1_cryptomap
crypto map outside_map 1 set pfs
crypto map outside_map 1 set peer 193.88.207.74
crypto map outside_map 1 set transform-set ESP-3DES-SHA
crypto map outside_map 2 match address outside_cryptomap_4
crypto map outside_map 2 set pfs
crypto map outside_map 2 set peer 193.88.207.90
crypto map outside_map 2 set transform-set ESP-3DES-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 3des
 hash sha
 group 2
 lifetime 86400
telnet 192.168.254.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd auto_config outside
!
dhcpd address 192.168.254.251-192.168.254.254 inside

!

!
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
webvpn
 enable outside
 url-list Server "Terminalserver" http://192.168.254.7 1
group-policy DfltGrpPolicy attributes
 banner none
 wins-server none
 dns-server none
 dhcp-network-scope none
 vpn-access-hours none
 vpn-simultaneous-logins 3
 vpn-idle-timeout 30
 vpn-session-timeout none
 vpn-filter none
 vpn-tunnel-protocol IPSec l2tp-ipsec webvpn
 password-storage disable
 ip-comp disable
 re-xauth disable
 group-lock none
 pfs disable
 ipsec-udp disable
 ipsec-udp-port 10000
 split-tunnel-policy tunnelall
 split-tunnel-network-list none
 default-domain none
 split-dns none
 intercept-dhcp 255.255.255.255 disable
 secure-unit-authentication disable
 user-authentication disable
 user-authentication-idle-timeout 30
 ip-phone-bypass disable
 leap-bypass disable
 nem disable
 backup-servers keep-client-config
 msie-proxy server none
 msie-proxy method no-modify
 msie-proxy except-list none
 msie-proxy local-bypass disable
 nac disable
 nac-sq-period 300
 nac-reval-period 36000
 nac-default-acl none
 address-pools none
 smartcard-removal-disconnect enable
 client-firewall none
 client-access-rule none
 webvpn
  functions url-entry file-access file-entry file-browsing mapi port-forward aut
o-download
  html-content-filter none
  homepage none
  keep-alive-ignore 4
  http-comp gzip
  filter none
  url-list none
  customization value DfltCustomization
  port-forward none
  port-forward-name value Application Access
  sso-server none
  deny-message value Login was successful, but because certain criteria have not
 been met or due to some specific group policy, you do not have permission to us
e any of the VPN features. Contact your IT administrator for more information
  svc none
  svc keep-installer installed
  svc keepalive none
  svc rekey time none
  svc rekey method none
  svc dpd-interval client none
  svc dpd-interval gateway none
  svc compression deflate
group-policy GroupPolicy1 internal
group-policy GroupPolicy1 attributes
 vpn-tunnel-protocol IPSec l2tp-ipsec webvpn
 webvpn
  functions url-entry file-access file-entry file-browsing
group-policy clientvpn internal
group-policy clientvpn attributes
 wins-server value 192.168.254.6
 dns-server value 192.168.254.6
 vpn-tunnel-protocol IPSec
 split-tunnel-policy tunnelspecified
 split-tunnel-network-list value clientvpn_splitTunnelAcl
 default-domain value sbdomain.local
 nac enable
group-policy firmavpn internal
group-policy firmavpn attributes
 wins-server value 192.168.254.6
 dns-server value 192.168.254.6
 vpn-idle-timeout none
 vpn-tunnel-protocol IPSec
 split-tunnel-network-list value clientvpn_splitTunnelAcl
 default-domain value sbdomain.local
 nac enable


tunnel-group DefaultWEBVPNGroup webvpn-attributes
 nbns-server xxx xxx xxx xxx master timeout 2 retry 2
tunnel-group xxx xxx xxx xxx type ipsec-l2l
tunnel-group xxx xxx xxx xxx ipsec-attributes
 pre-shared-key *
tunnel-group firmavpn type ipsec-ra
tunnel-group firmavpn general-attributes
 address-pool VPNPool
 default-group-policy firmavpn
tunnel-group firmavpn ipsec-attributes
 pre-shared-key *
tunnel-group xxx xxx xxx xxx type ipsec-l2l
tunnel-group xxx xxx xxx xxx ipsec-attributes
 pre-shared-key *
prompt hostname context
Cryptochecksum:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
: end
0
 
Alexey KomarovChief Project EngineerCommented:
access-list outside_access_in_1 extended permit tcp any host MosevejIP eq ftp
static (inside,outside) tcp interface ftp 192.168.254.9 ftp netmask 255.255.255.255
0
 
ithecoAuthor Commented:
access-list outside_access_in_1 extended permit tcp any host MosevejIP eq ftp

Is't this like "only a group og users? Every body chould be able to connect from eanywhere!  :)
0
 
iferizemCommented:
yes you can do that but for more information look at this link
http://www.cisco.com/en/US/docs/security/asa/asa70/configuration/guide/traffic.html
0
 
ithecoAuthor Commented:
I have looked at the Cisco help page, i do not understand it, thats why i write here.
0
 
Alexey KomarovChief Project EngineerCommented:

Every body can be able to connect from anywhere.
Your may restrict access on server side (username, password, group access, file perm.)
0
 
ithecoAuthor Commented:
access-list outside_access_in_1 extended permit tcp any host MosevejIP eq ftp

But how come i should use MosevejIP? then?
0
 
ithecoAuthor Commented:
Yeah i know that...

But i Cant figure out witch commands to put In to the ASA?
0
 
Istvan KalmarCommented:
this commands need to open FTP:

access-list outside_access_in_1 extended permit tcp any host MosevejIP eq ftp
static (inside,outside) tcp interface ftp 192.168.254.9 ftp netmask 255.255.255.255

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 8
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now