LoginSignup
0
0

デフォルトポート以外での疎通確認方法(telnet)

Posted at

httpを80番以外でポート開放しているときの動作確認

ポートが開いているか、接続できるかの確認。(※1.IPアドレスとポート番号は適当なモノに変更の上、実行してください。※2.疎通が許可されているホストから実行して下さい。)

curl -v telnet://192.168.33.10:50080

ページの取得・ダウンロード

$ curl -H 'Host:example.com' http://192.168.33.10:50080/

dsnの形式に注意してください
スキーム://[ユーザー名:パスワード@]ドメイン名:ポート番号/パス

参考にしたURL
1.
telnetやcurlでポートが開放されているか確認
http://teqspaces.com/Linux/9
2.
curlでhost指定・名前解決して実行
https://iettty.hatenablog.jp/entry/2018/10/23/235142
3.
URI(Uniform Resource Identifier)
http://www.dataondemand.co.jp/documents/data_integrator814/connectors/URI_Uniform_Resource_Identifier_.html

:skull: アクセス元IPを偽装しての動作確認も可能

[opc@0205oci_opeweb httpd]$ curl --header "X-Forwarded-For: 92.202.58.126" http://myproject.com/
<html>
<head>
</head>
<body>
        403 Forbidden
</body>
</html>
[opc@0205oci_opeweb httpd]$
curl --header "X-Forwarded-For: 92.202.58.126"  -H 'Host: who.myproject.com' --dump-header -    'http://133.106.63.247/'

参考URL:
カスタムIPを使用したCURLリクエストの送信
https://www.web-dev-qa-db-ja.com/ja/curl/%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0ip%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%9Fcurl%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%81%AE%E9%80%81%E4%BF%A1/960803849/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0