teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

誤りの修正

2020/05/15 08:25

投稿

ShigeMasa
ShigeMasa

スコア13

answer CHANGED
@@ -3,5 +3,5 @@
3
3
  ```
4
4
  lxc config device remove コンテナ名 port80
5
5
 
6
- PORT=80 PUBLIC_IP=your_public_ip CONTAINER_IP=your_container_ip sudo -E bash -c 'iptables -t nat -I PREROUTING -i eth0 -p TCP -d グローバルIP --dport 80 -j DNAT --to-destination コンテナIP:80 -m comment --comment "forward to the Apache2 container"'
6
+ iptables -t nat -I PREROUTING -i eth0 -p TCP -d グローバルIP --dport 80 -j DNAT --to-destination コンテナIP:80 -m comment --comment "forward to the Apache2 container
7
7
  ```