Hello all
Hope all is doing well with the craziness that is going on
So currently running a dedicated with one IP but need multiple containers that can serve port 80 each with their own internal/private IP. I have followed this guide the T but having issues with apt-get in the CT with port 80. Possibly because of the proxy? Network in the CTs were working fine but after I added the Nginx proxy everything broke.
SSH into the CT from outside works as well.
Guide
https://gist.github.com/basoro/b522864678a70b723de970c4272547c8#file-proxmox-proxy-L70
My setup is as follows
Host IPtables
Host interfaces file
Nginx Proxy CT interfaces file (CT 100)
Nginx Proxy CT nginx config file
Nginx Webserver CT (CT 101)
Hope all is doing well with the craziness that is going on
So currently running a dedicated with one IP but need multiple containers that can serve port 80 each with their own internal/private IP. I have followed this guide the T but having issues with apt-get in the CT with port 80. Possibly because of the proxy? Network in the CTs were working fine but after I added the Nginx proxy everything broke.
SSH into the CT from outside works as well.
Guide
https://gist.github.com/basoro/b522864678a70b723de970c4272547c8#file-proxmox-proxy-L70
My setup is as follows
Host IPtables
Code:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere anywhere tcp dpt:10022 to:192.168.1.100:22
DNAT tcp -- anywhere anywhere tcp dpt:10122 to:192.168.1.101:22
DNAT tcp -- anywhere anywhere tcp dpt:http to:192.168.1.100:80
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 192.168.1.0/24 anywhere
Code:
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address xx.xxx.xxx.95
netmask 255.255.255.0
gateway xx.xxx.xxx.1
bridge_ports eno1
bridge_stp off
bridge_fd 0
auto vmbr0:0
iface vmbr0:0 inet static
pre-up iptables-restore < /etc/iptables.rules
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
Nginx Proxy CT interfaces file (CT 100)
Code:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
Code:
server {
listen 80;
server_name domain.com *.domain.com;
location / {
proxy_pass http://192.168.1.101;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 150;
proxy_send_timeout 100;
proxy_read_timeout 100;
proxy_buffers 4 32k;
client_max_body_size 8m;
client_body_buffer_size 128k;
}
}
Nginx Webserver CT (CT 101)
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1