• 締切済み

proftpdのクライアント認証

タイトル通りですが、proftpdにおいてクライアント認証ができません。 もちろんmod_tlsは組み込んでありますし、クライアントに証明書を発行してあります。以下設定ですが、 <IfModule mod_tls.c> TLSEngine on TLSLog /var/log/proftpd/tls.log TLSProtocol SSLv23 TLSCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP # Are clients required to use FTP over TLS when talking to this server? TLSRequired on # Server's certificate TLSRSACertificateFile /usr/local/certs/server.crt TLSRSACertificateKeyFile /usr/local/certs/server.key # Authenticate clients that want to use FTP over TLS? TLSVerifyClient off </IfModule> この状態だと接続はできますが、当然クライアント認証かかっていませんよね。TLSVerifyClientをonにすると突然ログインできなくなってしますのです。 ぜひとも助けてください。

noname#12984
noname#12984

みんなの回答

  • entree
  • ベストアンサー率55% (405/735)
回答No.2

クライアント認証をするためには認証局の証明書も設定しないとだめですよ。 TLSCACertificateFile file-path あと、mod_tls.cではApacheで使えるディレクティブのSSLの部分をTLSに変えたもののほとんどが使えるのでApacheのマニュアルも参照してみるとよいかもしれません。

noname#12984
質問者

お礼

ありがとうございます。 しかし、これを加えてみても結果は変わりませんでした。 それ以前に、これを加えてしますとTLSVerifyClient offの状態でも接続できなくなってしまいます。 他に心当たりはないでしょうか? それとも<IfModule mod_tls.c>の外の設定がおかしいのでしょうか?

  • zem
  • ベストアンサー率70% (51/72)
回答No.1

突然ログインできなくなる現象について、 ひとまずログインが「拒否されたとき」の「サーバ側のエラー出力」はどのようになっているでしょうか。 /var/log/messages あたりに何か解決に至るヒントがあるかもしれません。  ネットで以前見た情報ではサーバとクライアントの組み合わせで上手くいかないという情報がありました。  ちょっと検索すると、あ、ありました。 http://66.102.7.104/search?q=cache:CtHbhngLvJUJ:acorn.zive.net/~oyaji/ftp/proftpd_ssl_rpm.htm+proftpd+TLS+TLSVerifyClient&hl=ja&lr=lang_ja  ご参考になりますでしょうか。。

noname#12984
質問者

お礼

パソコンおやじさんのサイトですね。 ここを参考にサーバーを組みたてているのでよく存じおります。 ログですね、たしかにここをチェックすべきでした。 成功ログ TLSVerifyClient off Jul 03 17:38:18 mod_tls/2.0.5[29251]: using default OpenSSL verification locations (see $SSL_CERT_DIR) Jul 03 17:38:18 mod_tls/2.0.5[29251]: SSL/TLS-P requested, starting TLS handshake Jul 03 17:38:18 mod_tls/2.0.5[29251]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits) Jul 03 17:38:19 mod_tls/2.0.5[29251]: Protection set to Private Jul 03 17:38:19 mod_tls/2.0.5[29251]: starting TLS negotiation on data connection Jul 03 17:38:19 mod_tls/2.0.5[29251]: TLSv1/SSLv3 data connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits) 失敗ログ TLSVerifyClient on Jul 03 17:39:22 mod_tls/2.0.5[29289]: using default OpenSSL verification locations (see $SSL_CERT_DIR) Jul 03 17:39:22 mod_tls/2.0.5[29289]: SSL/TLS-P requested, starting TLS handshake Jul 03 17:39:23 mod_tls/2.0.5[29289]: unable to accept SSL connection: error:00000001:lib(0):func(0):reason(1) Jul 03 17:39:23 mod_tls/2.0.5[29289]: SSL/TLS-P negotiation failed on control channel です。いかがでしょうか。。。?

noname#12984
質問者

補足

失礼いたしました。お礼に書いたのはtls.logですね。 messageはこのように表示されます。 Jul 3 18:00:43 *** proftpd[3325]: mizushima.ne.jp - 192.168.1.12:21 masquerading as 192.168.1.12 Jul 3 18:00:43 *** proftpd[3325]: mizushima.ne.jp (192.168.1.11[192.168.1.11]) - FTP session opened. Jul 3 18:00:43 *** PAM_pwdb[3325]: (ftp) session opened for user ユーザー名 by (uid=0) そして失敗時は Jul 3 18:00:43 *** PAM_pwdb[3325]: (ftp) session opened for user ユーザー名 by (uid=0) これがないだけです。 よろしくお願いします。

関連するQ&A

  • Proftpdの設定

    使っている環境 OS:CentOS 5 proftpd-1.3.0a-3.el5.rf xinetd-2.3.14-10.el5 Gnome入ってます。 proftpd.confの中身 ServerName "ProFTPD server" ServerIdent on "FTP Server ready." ServerAdmin root@localhost ServerType inetd DefaultServer on AccessGrantMsg "User %u logged in." DeferWelcome off DefaultRoot ~/public_file !wheel AuthPAMConfig proftpd AuthOrder mod_auth_pam.c* mod_auth_unix.c IdentLookups off UseReverseDNS off Port 21 Umask 022 ListOptions "-a" AllowRetrieveRestart on AllowStoreRestart on MaxInstances 20 # Set the user and group that the server normally runs at. User nobody Group nobody # Disable sendfile by default since it breaks displaying the download speeds in # ftptop and ftpwho UseSendfile no # This is where we want to put the pid file ScoreboardFile /var/run/proftpd.score # Normally, we want users to do a few things. <Global> AllowOverwrite yes <Limit ALL SITE_CHMOD> AllowAll </Limit> </Global> LogFormat default "%h %l %u %t \"%r\" %s %b" LogFormat auth "%v [%P] %h %t \"%r\" %s" LogFormat allinfo "%t : %u (%a [%h]) : [%s], %T, %m (%f)" TLSEngine on TLSRequired off TLSRSACertificateFile /etc/pki/tls/certs/proftpd.pem TLSRSACertificateKeyFile /etc/pki/tls/certs/proftpd.pem TLSCipherSuite ALL:!ADH:!DES TLSOptions NoCertRequest TLSVerifyClient off TLSLog /var/log/proftpd/tls.log ExtendedLog /var/log/proftpd/access.log WRITE,READ default ExtendedLog /var/log/proftpd/auth.log AUTH auth ExtendedLog /var/log/proftpd/all.log ALL allinfo TimesGMT off MasqueradeAddress eternalxaion.dip.jp PassivePorts 60000 60030 AuthUserFile /etc/ftpd.passwd AuthGroupFile /etc/ftpd.group AuthOrder mod_auth_file.c ファイアウォールでは信頼できるサービスのFTPにチェックいれてます。 /etc/xinetd.d/xproftpdの中身 service ftp { disable = no socket_type = stream wait = no user = root server = /usr/sbin/in.proftpd log_on_success += HOST PID log_on_failure += HOST nice = 10 } ユーザ名とパスワードはOSのログイン名とパスワードでいいんですよね?ちなみにログは記録されてませんでした。ファイルの権限は755の状態です。なぜログインできないのかお分かりになる方よろしくお願いします

  • ProFTPDでのPAM認証

    こんばんは。最近、TurboLinux 11 Serverでサーバーの勉強をしているのですが、ひとつ分からないことがあるので質問します。 ブラウザでftpサーバーにアクセスしたとき、認証ダイアログが出て認証できるようにしようと思い調べたところ、AuthPAMAuthoritativeというディレクティブをonにするといいという記事を見つけました。しかしながら、# Use pam to authenticate (default) and be authoritativeの欄にそれを記述して再起動すると、エラーが出て起動できません。どうしたらいいのでしょうか? また、本当にこれで認証ダイアログが出てくるのかもいまいち分からないので、もし見当はずれのことを言っていたらご指摘ください。

  • ProFTPD 1.2.2rc1 Server (ProFTPD)

    以前も、同じような質問をしたのですが解決出来なくてもういちど助けてもらえたらと思います。。。。 ^^^^^^^^^^^^^^^^^ ホスト ftp.*****.jp を探しています. ホスト ftp.*****.jp (***.***.**.** (21)) に接続しています. 接続しました. 220 ProFTPD 1.2.2rc1 Server (ProFTPD) [***.***.**.**] >USER ******** 331 Password required for ekun_ftp. >PASS [xxxxxx] 230- ****************** Site Administrator FTP instructions ****************** This session begins in your user home directory at /users/******* ログインできません. ^^^^^^^^^^^^^^^^ このような表示が出てFTP接続が出来ません。 ProFTPD 1.2.2rc1 Server (ProFTPD) にFTP接続できません。 ユーザーID。パスワード。開始フォルダ。 全てレンタルサーバー屋の言うとおりに設定しています。 FTPクライアントはffftp ver 1.88a を使用しています。

  • xinetdとproftpdについて

    宜しくお願いします。 xinetdを使いproftpdでFTPの設定を行っております。 FTPポートにIPアドレスを追加したいので、proftpd.confに追加するIPをonly_formで追加したので、xinetdとproftpdを再起動しようとしたのですが、xinetdは問題なく再起動できたのですが、proftpdが再起動できません。こんなエラーが返されます。 logs - fatal: Socket operation on non-socket logs - (Running from command line? Use `ServerType standalone' in config file!) /etc/xinetd.confの内容は defaults { instances = 60 log_type = SYSLOG authpriv log_on_success = HOST PID log_on_failure = HOST cps = 25 30 } includedir /etc/xinetd.d となっております。(コメント行は省いています。) /etc/xinetd.d/proftpdの内容は ervice ftp { socket_type = stream wait = no user = root server = /usr/local/sbin/in.proftpd log_on_success += DURATION USERID log_on_failure += USERID nice = 10 disable = no only_form = ***.***.***.*** } となっております。 proftpdが再起動できないので、設定が反映されず、上記のonly_formのIPアドレスでアクセスできません。

  • ProFTPd + iconvパッチ CharsetLocal が unknown

    ProFTPd に iconv パッチをあて proftpd.confに CharsetLocal UTF-8 CharsetRemote CP932 この2つの設定をしたところ、 noppi@sv:/usr/local/src$ /usr/local/sbin/proftpd -t Checking syntax of configuration file - Fatal: unknown configuration directive 'CharsetLocal' on line 43 of '/usr/local/etc/proftpd.conf' となってしまいます。 -l で確認するとCompiled-in modules:にはmod_codeconv.cが含まれているので、パッチあてとビルドはできていると思います。 また、Charset系のオプションをはずすと、inet.dから正しく起こされます。 原因や対策などご存知の方、よろしくお願いいたします。 OS:Debian Etch Linux 2.6.22 コマンド: cd /usr/local/src wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.0.tar.gz wget http://www.hakusan.tsg.ne.jp/tjkawa/software/misc/proftpd-iconv/pack/proftpd-1.3.0-iconv.patch.gz wget http://www.hayasoft.com/JP/software/linux/proftpd-1.3.0-nlst-ffftp.patch tar -zxvf proftpd-1.3.0.tar.gz gzip -d proftpd-1.3.0-iconv.patch.gz patch -p0 < proftpd-1.3.0-iconv.patch patch -p0 < proftpd-1.3.0-nlst-ffftp.patch cd proftpd-1.3.0 ./configure --prefix=/usr --with-modules=mod_codeconv:mod_df make make install

  • Debian sargeのproftpd

    お世話になります。 Debian sargeで構築を試みているのですが debianパッケージのproftpdを利用してみるとftp接続は出来るがリスト表示されない現象が出ております。 proftpd.confはwoodyで利用していたものの流用です。 現象が発生しているクライアントソフトはffftpです。 nextftpとかではリスト表示出来るようですが、クライアントソフトに依存せずサーバ側で行いたいと思ってます。 どのような設定が良いのでしょうか? サーバ側で利用しているproftpdのバージョンは 1.2.10-15です。

  • LDAP認証によるPfoftpdについて

    Solaris10で、OpenLDAPとProftpdとSun付属のLDAPクライアントで構成された環境で、Windowsから、FFFTPを使ってLDAP認証でログインさせようとしているんですが、うまく行きません。また、Proftpdをinetから起動させているんですが、再起動すると状態がメンテナンスの状態で、オンラインになりません。 Windowsから、SSHを使ってLDAPユーザでログインはできます。教えていたら幸いです。よろしくお願いします。 Proftpd.conf AuthPAM off LDAPServer "192.168.24.52" LDAPAuthBinds on LDAPDNInfo dc=solaristest,dc=com LDAPDoAuth on "ou=People,dc=solaristest,dc=com" LDAPDoGIDLookups on "ou=Group,dc=solaristest,dc=com" LDAPDoUIDLookups on "ou=People,dc=solaristest,dc=com" /etc/nsswitch.conf hosts files ldap svcs -a | grep ftp maintenance 2:09:32 svc:/network/ftp:default Proftpd.log Dec 25 02:07:44 solaris proftpd[1102] solaris (loghost[192.168.24.51]): FTP session opened. Dec 25 02:07:46 solaris proftpd[1102] solaris (loghost[192.168.24.51]): mod_ldap/2.8.20-20090124: pr_ldap_connect(): bind as cn=Manager,dc=solaristest,dc=com failed: Server is unwilling to perform Dec 25 02:07:46 solaris proftpd[1102] solaris (loghost[192.168.24.51]): mod_ldap/2.8.20-20090124: ldap_handle_getgroups(): LDAP search failed: Bad parameter to an ldap routine Dec 25 02:07:48 solaris proftpd[1102] solaris (loghost[192.168.24.51]): mod_ldap/2.8.20-20090124: pr_ldap_connect(): bind as cn=Manager,dc=solaristest,dc=com failed: Server is unwilling to perform Dec 25 02:07:48 solaris proftpd[1102] solaris (loghost[192.168.24.51]): mod_ldap/2.8.20-20090124: ldap_handle_getgroups(): LDAP search failed: Bad parameter to an ldap routine Dec 25 02:07:48 solaris proftpd[1102] solaris (loghost[192.168.24.51]): mod_ldap/2.8.20-20090124: pr_ldap_user_lookup(): LDAP search failed: Bad parameter to an ldap routine Dec 25 02:07:48 solaris proftpd[1102] solaris (loghost[192.168.24.51]): USER hoge: no such user found from loghost [192.168.24.51] to 192.168.24.52:21 Dec 25 02:07:49 solaris proftpd[1102] solaris (loghost[192.168.24.51]): FTP session closed

  • ftpクライアントからのアクセスをredirectする方法 

    ftpクライアント(ffftpなどのソフト)からのアクセスを, redirectする(他のサーバーへとばす)には、どうしたら良いでしょうか。 proftpd を使っていますが、proftpd の設定で出来るでしょうか。 それらしいのが見つからないので、困ってます。 もしくは、それ以外の方法があるでしょうか。

  • apacheのSSLクライアント認証がうまくいきません

    apacheのSSLクライアント認証がうまくいきません apache1.3.41とmod_sslを利用してクライアント認証を実装しようとしているのですが クライアント認証を有効にするとhttps接続時に証明書提示した後に「ページを表示できません」となってしまいます。 手順は以下のサイトを参考に設定したものです http://www.aconus.com/~oyaji/www/apache_linux_ssl.htm 証明書の発行もインストールも特に問題なくできましたが、接続時にクライアント証明書を提示しても「ページを表示できません」と出てしまいます。ssl_engine_logにもerror_logにもそれらしいエラーが見当たらないのでそれ以外のところに原因があるのでしょうか。 httpd.confの一部(デフォルトからSSLの部分を変更した部分だけ)を展開します。 どこか間違いがあればご指摘よろしくおねがいします。 また、この現象の原因が分かる方がいらっしゃればご教授願います。 <VirtualHost _default_:443> DocumentRoot "/home/xxxxx/webIndex" ServerName 192.168.11.2 ServerAdmin xxx@xxxxxxx.xxx DirectoryIndex login.html ErrorLog /usr/local/apache/logs/error_log TransferLog /usr/local/apache/logs/access_log SSLEngine on SSLCertificateFile /usr/local/apache/conf/ssl.crt/servercert.pem SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/serverkey.pem SSLCACertificatePath /usr/local/apache/conf/ssl.crt SSLCACertificateFile /usr/local/apache/conf/ssl.crt/cacert.pem SSLVerifyClient require SSLVerifyDepth 1     ・     ・     ・ </VirtualHost> ちなみにクライアント認証の部分をコメントアウトしてサーバ証明書だけ有効にすると正常に ページにアクセスできますので、クライアント認証の設定の部分に問題があるのみたいなのですが 起動ができるので設定以外のところに問題があるようにも思えます。 #SSLCACertificatePath /usr/local/apache/conf/ssl.crt #SSLCACertificateFile /usr/local/apache/conf/ssl.crt/cacert.pem #SSLVerifyClient require #SSLVerifyDepth 1 以上です 宜しくお願いします。

  • コマンドライン からproftpd を起動しようとすると、proftpd が起動しません。

    こんばんわ, 現在Linuxでftpサーバー(インターネット)を立ち上げようと挑戦しています。 とりあえず,インストールは終わり,基本的な設定は終わったのですが,タイトルどおりコマンドライン からproftpd を起動しようとすると、"Fatal: Socket operation on non-socket"というメッセージが出て、proftpd が起動しません。http://www.infoscience.co.jp/technical/proftpd/configuration.html によると,それは,「proftpd.conf 設定ファイルを編集して、ServerType directive を読み込むように、追加、編集する必要があります」とありますが, 私のetc/proftpd/proftpd.confの中身は 「ServerType    inetd」 にしています。何がおかしいのでしょうか。 よろしくお願いします。