우리가 제공하는 노드 서버가 있고 localhost:90
시스템 내부의 모든 컬 호출 168.92.168.92
을 localhost:90
.
이것이 어떻게 달성될 수 있습니까? iptables를 사용합니까?
OUTPUT 및 PREROUTING을 시도했지만 요청을 연결할 수 없습니다.
Chain PREROUTING (policy ACCEPT 3339 packets, 200K bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DNAT tcp -- 168.92.168.92 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:127.0.0.1:90
Chain INPUT (policy ACCEPT 3339 packets, 200K bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 6220 packets, 652K bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DOCKER all -- * * 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
2 0 0 DNAT tcp -- * * 168.92.168.92 0.0.0.0/0 tcp dpt:80 to:127.0.0.1:90
산출:
# curl -v http://168.92.168.92/hello
* About to connect() to 168.92.168.92 80 (#0)
* Trying 168.92.168.92... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
Curl directly to the server on localhost:90 works, but curl on 168.92.168.92 does not.
내가 무엇을 놓치고 있나요?