キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
3868
閲覧回数
5
いいね!
6
返信

ASAでのrsh/rcp通信について

toshiaki.nema
Level 1
Level 1

ASA経由でrsh/rcp通信を行いたいと考えていますが、permitするポートは何番ポートなのかを調べています。

rshについては514番と言う事が判明しました。

http://www.cisco.com/cisco/web/support/JP/docs/SEC/Multi-FunctionSecur/AdaptiveSecurDeviceMGR/CG/006/inspect_overview.html?bid=0900e4b182bdeb70

 

しかしrcpについてのドキュメントはありませんでした。

 

SOLARIS の ipfilter では rsh と同じ514番ですので、wellknown ports と考えますとASAも同じかと考えています。

もしご存知の方もしくはご経験のある方がいらっしゃいましたら、ご助言頂ければ幸いです。

 

【参考】以下SOLARISのトレースです。

---

-bash-3.00# snoop -ta -r -i rcp.log -V | grep TCP
  1 21:29:38.06991 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Syn Seq=2704417843 Len=0 Win=53760 Options=<mss 8960,nop,wscale 0,nop,nop,sackOK>
  2 21:29:38.06994 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Syn Ack=2704417844 Seq=3256605408 Len=0 Win=49640 Options=<mss 1460,nop,wscale 0,nop,nop,sackOK>
  3 21:29:38.07012 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Ack=3256605409 Seq=2704417844 Len=0 Win=54020
  4 21:29:38.07017 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Push Ack=3256605409 Seq=2704417844 Len=1 Win=54020
  5 21:29:38.07018 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Ack=2704417845 Seq=3256605409 Len=0 Win=49639
  6 21:29:38.07032 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Push Ack=3256605409 Seq=2704417845 Len=53 Win=54020
  7 21:29:38.07035 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Ack=2704417898 Seq=3256605409 Len=0 Win=49640
  8 21:29:38.09275 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Push Ack=2704417898 Seq=3256605409 Len=1 Win=49640
  9 21:29:38.09290 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Ack=3256605410 Seq=2704417898 Len=0 Win=54020
 10 21:29:38.19582 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Push Ack=2704417898 Seq=3256605410 Len=1 Win=49640
 11 21:29:38.19599 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Ack=3256605411 Seq=2704417898 Len=0 Win=54020
 12 21:29:38.19640 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Push Ack=3256605411 Seq=2704417898 Len=17 Win=54020
 13 21:29:38.19654 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Push Ack=2704417915 Seq=3256605411 Len=1 Win=49640
 14 21:29:38.19773 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Push Ack=3256605412 Seq=2704417915 Len=3 Win=54020
 15 21:29:38.26002 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Ack=2704417918 Seq=3256605412 Len=0 Win=49640
 16 21:29:38.26024 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Push Ack=3256605412 Seq=2704417918 Len=1 Win=54020
 17 21:29:38.26025 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Push Ack=2704417919 Seq=3256605412 Len=1 Win=49640
 18 21:29:38.26055 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Fin Ack=3256605413 Seq=2704417919 Len=0 Win=54020
 19 21:29:38.26056 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Ack=2704417920 Seq=3256605413 Len=0 Win=49640
 20 21:29:38.26087 192.168.2.170 -> 192.168.2.130 TCP D=979 S=514 Fin Ack=2704417920 Seq=3256605413 Len=0 Win=49640
 21 21:29:38.26099 192.168.2.130 -> 192.168.2.170 TCP D=514 S=979 Ack=3256605414 Seq=2704417920 Len=0 Win=54020

---

1 件の受理された解決策

受理された解決策

こんにちわ!

CiscoWorksのページの[What Is rcp?]によると、rcpは rshellのサブセットであり、TCP514を用い、rshellは殆どのCiscoデバイスで"rcmd"と共に定義されていると記載があります。

[What Is rcp?]
The rcp is a subset of the UNIX rshell service, which allows UNIX users to issue shell commands on remote UNIX systems. The rcp is a UNIX built-in service. This service uses Transmission Control Protocol (TCP) as the transport protocol and listens for requests at TCP port 514.  Cisco implements the rshell service, which also has the name "remote command" (rcmd), in most Cisco devices that run Cisco IOS Software.

http://www.cisco.com/c/en/us/support/docs/cloud-systems-management/works-resource-manager-essentials-35/8535-rcp.html#backinfo​
 

 

ASAも、コマンドラインでは、 cmd(rcmd)もしくは rshを定義可能です。

ASA/sec/act(config)# access-list TEST ext perm tcp any any eq ?
configure mode commands/options:
  <1-65535>        Enter port number (1 - 65535)
  aol
  bgp
  chargen
  cifs
  citrix-ica
  cmd     <-----THIS 
  ctiqbe
  daytime
   -- snip --
  pop3
  pptp
  rsh     <-----THIS 

 

ASDMからですと、何故だか解らないのですが、rshのみサービスから設定できるようです。(恐らく、サービス名cmdが古い定義だからでしょう。)

 

ASAのデフォルト定義のサービス名とポート番号紐づけは以下も参考になると思います。

[Cisco ASA ACL built-in port name to number mapping?]
https://supportforums.cisco.com/discussion/11242756/cisco-asa-acl-built-port-name-number-mapping

 

ただ、私個人の経験ですと、具体的にASAを介する構成でRCPを使っているユーザは見たことが無いのが正直なところです・・・。
 

参考になれば 幸いです! laugh

元の投稿で解決策を見る

6件の返信6

Akira Muranaka
Level 8
Level 8

こんばんわ! 

以下のWikipediaだと、RCPは、Remote Shell(TCP514)の一部だと思うのですが、いかがでしょう

http://en.wikipedia.org/wiki/Remote_Shell
http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

かなーり古いサイトですが、以下Ciscoさんサイトでも、RCPがTCP514なのが確認できます

http://www.cisco.com/c/en/us/support/docs/cloud-systems-management/works-resource-manager-essentials-35/8535-rcp.html

参考になれば!  laugh

こんにちわ

http://www.cisco.com/c/en/us/support/docs/cloud-systems-management/works-resource-manager-essentials-35/8535-rcp.html

CiscoWorksでも、ASAでも、RCPの扱い(Remote Shell(TCP514))は同じなんでしょうか?

こんにちわ!

CiscoWorksのページの[What Is rcp?]によると、rcpは rshellのサブセットであり、TCP514を用い、rshellは殆どのCiscoデバイスで"rcmd"と共に定義されていると記載があります。

[What Is rcp?]
The rcp is a subset of the UNIX rshell service, which allows UNIX users to issue shell commands on remote UNIX systems. The rcp is a UNIX built-in service. This service uses Transmission Control Protocol (TCP) as the transport protocol and listens for requests at TCP port 514.  Cisco implements the rshell service, which also has the name "remote command" (rcmd), in most Cisco devices that run Cisco IOS Software.

http://www.cisco.com/c/en/us/support/docs/cloud-systems-management/works-resource-manager-essentials-35/8535-rcp.html#backinfo​
 

 

ASAも、コマンドラインでは、 cmd(rcmd)もしくは rshを定義可能です。

ASA/sec/act(config)# access-list TEST ext perm tcp any any eq ?
configure mode commands/options:
  <1-65535>        Enter port number (1 - 65535)
  aol
  bgp
  chargen
  cifs
  citrix-ica
  cmd     <-----THIS 
  ctiqbe
  daytime
   -- snip --
  pop3
  pptp
  rsh     <-----THIS 

 

ASDMからですと、何故だか解らないのですが、rshのみサービスから設定できるようです。(恐らく、サービス名cmdが古い定義だからでしょう。)

 

ASAのデフォルト定義のサービス名とポート番号紐づけは以下も参考になると思います。

[Cisco ASA ACL built-in port name to number mapping?]
https://supportforums.cisco.com/discussion/11242756/cisco-asa-acl-built-port-name-number-mapping

 

ただ、私個人の経験ですと、具体的にASAを介する構成でRCPを使っているユーザは見たことが無いのが正直なところです・・・。
 

参考になれば 幸いです! laugh

こんにちわ。詳しい回答ありがとうございました。理解できました!!

こんにちわ。無事動く事を祈ってます!!

toshiaki.nema
Level 1
Level 1

ありがとうございました。CiscoWorks上では514ポートなんですね。

ASやIOSのドキュメントを見てもrcpはサポートしているようなのですが、ASA software上でのドキュメントには無いのが不思議です。

 

TCP ポートと UDP ポート
http://www.cisco.com/cisco/web/support/JP/docs/SEC/Firewall/ASA5500NextGenerationFire/CG/001/ref_ports.html?bid=0900e4b183271d68#pgfId-1007738

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします