ip6tablesを使用して、あるポートを別のローカルポートにリダイレクトするにはどうすればよいですか?例: このような何か: ip6tablesを-tのnat -A PREROUTING -j REDIRECT -p TCP --dport 443 --to-ポートip6tablesのポートをリダイレクト
答えて
をサポートしていません。通常、NAT環境ではNATを使用していますが、NATは一般的にIPv6でサポートされていません。
普通のユーザーとして低ポートにバインドするだけでよい場合は、this answerに記載されている回避策を試してみてください。もちろん、Tomcatの場合、これはJavaのプロセスにその能力を与えることを意味するように思えます。
まあ、これは古い質問ですが、私は同じことを行う必要があるので...ここで私が見つけたものです:
TPROXY
This target is only valid in the mangle table, in the PREROUTING chain and user-defined chains which are only called from this chain. It redirects the packet to a local socket without changing the packet header in any way. It can also change the mark value which can then be used in advanced routing rules. It takes three options:
--on-port port
This specifies a destination port to use. It is a required option, 0 means the new destination port is the same as the original. This is only valid if the rule also specifies -p tcp or -p udp.
--on-ip address
This specifies a destination address to use. By default the address is the IP address of the incoming interface. This is only valid if the rule also specifies -p tcp or -p udp.
--tproxy-mark value[/mask]
Marks packets with the given value/mask. The fwmark value set here can be used by advanced routing. (Required for transparent proxying to work: otherwise these packets will get forwarded, which is probably not what you want.)
これは当然のだけip6tablesを、有効です。だから私はこれが有効だと思う:
ip6tables -t mangle -A PREROUTING -p tcp --dport 443 -j TPROXY --on-port 8443
しかし、私はまだ試していない。
あなたはもっと難しいでしょうIPv4ではREDIRECTより... TPROXYはmangleテーブルに特別な動作をしているので、それにマークを付けて高度なルーティングをする必要があります。 –
"--on-ip"にはどのnetfilter-Versionが必要ですか? ip6tables v1.4.8(Debian Squeezeパッケージ)は動作しません。前もって感謝します ! – int2000
私のテストボックスで/usr/share/doc/iptables/changelog.Debian.gzを短く検索した後、1.4.11.1-1にhttp://bugs.debianのように記載されているようです。 org/cgi-bin/bugreport.cgi?bug = 529954 –
- 1. URLをポートにリダイレクト
- 2. htaccessポートから別のポートへリダイレクト
- 3. httpポートをnodePortにリダイレクト
- 4. UARTデータをpcieポートにリダイレクト
- 5. zabbix.conf別のポートにリダイレクト
- 6. IISポート8880のHTTPをポート8443のhttpsにリダイレクトします。
- 7. localhost(Fedora)のポート5000からWebサーバーをポート80にリダイレクト
- 8. ドメインiptablesでポートにリダイレクト
- 9. GoogleOAuthリダイレクトURL、LocalServerReceiverポート番号
- 10. Azure WebPageのポートをVMにリダイレクト
- 11. SubDomain要求を特定のポートにリダイレクト
- 12. あるサーバー(ポート)から別のサーバー(ポート)へのリダイレクト
- 13. 162ポートをカスタマイズされたポートにリダイレクトするには?
- 14. あるポートから別のポートにリダイレクトする方法は?
- 15. のsvn + sshとリダイレクトsshのポート
- 16. Nginx:リダイレクト時にポートを保持する
- 17. 不必要なポート8080へのリダイレクト
- 18. 異なるポート上の2つのDockerコンテナの同じポートをリダイレクト
- 19. ip6tables用のconnlimitモジュールはありますか?
- 20. Nginx + NodeJSがポート80にリダイレクトする
- 21. Nginxサーバー複数のサイトとドメインのリダイレクト(同じポート/別のポート上)
- 22. HTTPを別のポートのHTTPSにリダイレクトする
- 23. apache permanentすべてのリクエストを別のポートにリダイレクト
- 24. 別のポートにリダイレクトすることはProxyPassを取得|場所
- 25. Apache 2.4はhttpsを別のポートにリダイレクトします
- 26. Windows:UDPトラフィックを別のポートにリダイレクトする方法
- 27. 別のポートにTomcat(Spring tcServerとして)をリダイレクト
- 28. すべてのプログラムパケットを代替ポート経由でリダイレクト
- 29. ポートへの接続を制限し、他の要求を別のポートにリダイレクトする方法は?
- 30. vPSのドッカーコンテナの出力ポート用のnginx/apacheリダイレクト
明らかに 'ip6tables' v1.4.18とLinuxカーネルv3.8は' REDIRECT'をサポートしています:https://sector7g.be/posts/ipv6-nat-pre-routing-with-iptables –