KVMポート転送

KVMポート転送

Debian ホストと Ubuntu ゲストがいます。ポート8055を使用して外部からWebサーバー(ポート80)に接続したいと思います。私はこの「ハッキング」を試しましたhttp://wiki.libvirt.org/page/Networking#Forwarding_Incoming_Connections しかし、成功しませんでした。その後、手動iptablesを試しました。

iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 8055 -j DNAT --to-destination 192.168.122.234:80
iptables -A FORWARD -p tcp -d 192.168.122.234 --dport 8080 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

何も動作しません。私はあなたと何をもっと共有するのかわかりません。

root@ms532:~#  iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.122.0/24     state NEW,RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             192.168.122.234      state NEW tcp dpt:9901
ACCEPT     tcp  --  anywhere             192.168.122.234      state NEW tcp dpt:http
ACCEPT     all  --  anywhere             192.168.122.0/24     ctstate RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
ACCEPT     all  --  anywhere             192.168.122.0/24     state NEW,RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc

ベストアンサー1

おすすめ記事