Hi All,
I would appreciate any assistance to help me understand how to get a website to be hosted from a proxmox VM behind a single IP, NAT is working from inside out, jjst trying to get the website to display with an A record pointing to my proxmox server?
I have everything working from the inside out, i.e. RDP, ssh, Zerotier, and so on. I have set up a docker Nginx reverse proxy and WordPress (in the process of typimng up a tutorial as I feel this is lacking for new users, such as myself) container to host multiple websites. all working locally. I have set up a DC level security group to open up ports 80, 443, and applied that at DC, NODE, and VM levels, etc I have also set iptables to forward incoming
e.g.
DC and Node PVEFW
VM level
I run a
. and it shows the correct public IP etc for the above. I am clearly missing something and just cannot figure it out how to open port 80 (443 I will attack later) I have the A records pointing to the proxmox server, I just can't seem to get the incoming request on port 80/443 to accept and forward to the internal VM that is hosting the website.
I would appreciate any assistance to help me understand how to get a website to be hosted from a proxmox VM behind a single IP, NAT is working from inside out, jjst trying to get the website to display with an A record pointing to my proxmox server?
I have everything working from the inside out, i.e. RDP, ssh, Zerotier, and so on. I have set up a docker Nginx reverse proxy and WordPress (in the process of typimng up a tutorial as I feel this is lacking for new users, such as myself) container to host multiple websites. all working locally. I have set up a DC level security group to open up ports 80, 443, and applied that at DC, NODE, and VM levels, etc I have also set iptables to forward incoming
e.g.
Code:
iptables -t nat -A PREROUTING -d MYPUBLIC IP -p tcp --dport 443 -j DNAT --to 10.10.10.102:443
iptables -t nat -A PREROUTING -d MYPUBLICIP -p tcp --dport 80 -j DNAT --to 10.10.10.102:80
DC and Node PVEFW
Code:
iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere anywhere tcp dpt:http to:10.10.10.102:80
DNAT tcp -- anywhere anywhere tcp dpt:https to:10.10.10.102:443
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
PVEFW-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
PVEFW-FORWARD all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
PVEFW-OUTPUT all -- anywhere anywhere
Chain PVEFW-Drop (0 references)
target prot opt source destination
PVEFW-reject tcp -- anywhere anywhere tcp dpt:whois
PVEFW-DropBroadcast all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp fragmentation-needed
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
DROP all -- anywhere anywhere ctstate INVALID
DROP udp -- anywhere anywhere multiport dports epmap,microsoft-ds
DROP udp -- anywhere anywhere udp dpts:netbios-ns:netbios-ssn
DROP udp -- anywhere anywhere udp spt:netbios-ns dpts:1024:65535
DROP tcp -- anywhere anywhere multiport dports epmap,netbios-ssn,microsoft-ds
DROP udp -- anywhere anywhere udp dpt:1900
DROP tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN
DROP udp -- anywhere anywhere udp spt:domain
all -- anywhere anywhere /* PVESIG:WDy2wbFe7jNYEyoO3QhUELZ4mIQ */
Chain PVEFW-DropBroadcast (2 references)
target prot opt source destination
DROP all -- anywhere anywhere ADDRTYPE match dst-type BROADCAST
DROP all -- anywhere anywhere ADDRTYPE match dst-type MULTICAST
DROP all -- anywhere anywhere ADDRTYPE match dst-type ANYCAST
DROP all -- anywhere base-address.mcast.net/4
all -- anywhere anywhere /* PVESIG:NyjHNAtFbkH7WGLamPpdVnxHy4w */
Chain PVEFW-FORWARD (1 references)
target prot opt source destination
DROP all -- anywhere anywhere ctstate INVALID
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
PVEFW-FWBR-IN all -- anywhere anywhere PHYSDEV match --physdev-in fwln+ --physdev-is-bridged
PVEFW-FWBR-OUT all -- anywhere anywhere PHYSDEV match --physdev-out fwln+ --physdev-is-bridged
all -- anywhere anywhere /* PVESIG:qnNexOcGa+y+jebd4dAUqFSp5nw */
Chain PVEFW-FWBR-IN (1 references)
target prot opt source destination
PVEFW-smurfs all -- anywhere anywhere ctstate INVALID,NEW
all -- anywhere anywhere /* PVESIG:Ijl7/xz0DD7LF91MlLCz0ybZBE0 */
Chain PVEFW-FWBR-OUT (1 references)
target prot opt source destination
all -- anywhere anywhere /* PVESIG:2jmj7l5rSw0yVb/vlWAYkK/YBwk */
Chain PVEFW-HOST-IN (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere ctstate INVALID
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
PVEFW-smurfs all -- anywhere anywhere ctstate INVALID,NEW
RETURN igmp -- anywhere anywhere
RETURN tcp -- 192.168.100.63 anywhere tcp spt:https
RETURN tcp -- 192.168.100.63 anywhere tcp spt:http
RETURN udp -- anywhere anywhere udp dpt:5201
RETURN udp -- anywhere anywhere udp dpt:9993
RETURN tcp -- anywhere anywhere match-set PVEFW-0-externalip-v4 src tcp dpt:9022
RETURN tcp -- anywhere anywhere match-set PVEFW-0-externalip-v4 src tcp dpt:8006
DROP all -- anywhere anywhere
RETURN tcp -- 192.168.100.63 anywhere tcp spt:https
RETURN tcp -- 192.168.100.63 anywhere tcp spt:http
RETURN udp -- anywhere anywhere udp dpt:9993
RETURN udp -- anywhere anywhere udp dpt:5201
RETURN tcp -- anywhere PVE-PXC-ETL002.local match-set PVEFW-0-externalip-v4 src tcp dpt:8006
RETURN tcp -- anywhere PVE-PXC-ETL002.local match-set PVEFW-0-externalip-v4 src tcp dpt:9022
DROP icmp -- anywhere anywhere
RETURN tcp -- anywhere anywhere match-set PVEFW-0-management-v4 src tcp dpt:8006
RETURN tcp -- anywhere anywhere match-set PVEFW-0-management-v4 src tcp dpts:5900:5999
RETURN tcp -- anywhere anywhere match-set PVEFW-0-management-v4 src tcp dpt:3128
RETURN tcp -- anywhere anywhere match-set PVEFW-0-management-v4 src tcp dpt:ssh
RETURN tcp -- anywhere anywhere match-set PVEFW-0-management-v4 src tcp dpts:60000:60050
RETURN all -- anywhere anywhere
all -- anywhere anywhere /* PVESIG:t7WoKIm8/VFUsxKZG9ZCvSMdKOw */
Chain PVEFW-HOST-OUT (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere ctstate INVALID
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
RETURN igmp -- anywhere anywhere
RETURN tcp -- anywhere 80.63.3ea9.ip4.static.sl-reverse.com/28 tcp dpt:8006
RETURN tcp -- anywhere 80.63.3ea9.ip4.static.sl-reverse.com/28 tcp dpt:ssh
RETURN tcp -- anywhere 80.63.3ea9.ip4.static.sl-reverse.com/28 tcp dpts:5900:5999
RETURN tcp -- anywhere 80.63.3ea9.ip4.static.sl-reverse.com/28 tcp dpt:3128
RETURN all -- anywhere anywhere
all -- anywhere anywhere /* PVESIG:42FPs3oALeKd4tPDbjkRtVpu+8Y */
Chain PVEFW-INPUT (1 references)
target prot opt source destination
PVEFW-HOST-IN all -- anywhere anywhere
all -- anywhere anywhere /* PVESIG:+5iMmLaxKXynOB/+5xibfx7WhFk */
Chain PVEFW-OUTPUT (1 references)
target prot opt source destination
PVEFW-HOST-OUT all -- anywhere anywhere
all -- anywhere anywhere /* PVESIG:LjHoZeSSiWAG3+2ZAyL/xuEehd0 */
Chain PVEFW-Reject (0 references)
target prot opt source destination
PVEFW-reject tcp -- anywhere anywhere tcp dpt:whois
PVEFW-DropBroadcast all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp fragmentation-needed
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
DROP all -- anywhere anywhere ctstate INVALID
PVEFW-reject udp -- anywhere anywhere multiport dports epmap,microsoft-ds
PVEFW-reject udp -- anywhere anywhere udp dpts:netbios-ns:netbios-ssn
PVEFW-reject udp -- anywhere anywhere udp spt:netbios-ns dpts:1024:65535
PVEFW-reject tcp -- anywhere anywhere multiport dports epmap,netbios-ssn,microsoft-ds
DROP udp -- anywhere anywhere udp dpt:1900
DROP tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN
DROP udp -- anywhere anywhere udp spt:domain
all -- anywhere anywhere /* PVESIG:CZJnIN6rAdpu+ej59QPr9+laMUo */
Chain PVEFW-SET-ACCEPT-MARK (0 references)
target prot opt source destination
MARK all -- anywhere anywhere MARK or 0x80000000
all -- anywhere anywhere /* PVESIG:Hg/OIgIwJChBUcWU8Xnjhdd2jUY */
Chain PVEFW-logflags (5 references)
target prot opt source destination
DROP all -- anywhere anywhere
all -- anywhere anywhere /* PVESIG:MN4PH1oPZeABMuWr64RrygPfW7A */
Chain PVEFW-reject (6 references)
target prot opt source destination
DROP all -- anywhere anywhere ADDRTYPE match dst-type BROADCAST
DROP all -- base-address.mcast.net/4 anywhere
DROP icmp -- anywhere anywhere
REJECT tcp -- anywhere anywhere reject-with tcp-reset
REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable
REJECT icmp -- anywhere anywhere reject-with icmp-host-unreachable
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
all -- anywhere anywhere /* PVESIG:Jlkrtle1mDdtxDeI9QaDSL++Npc */
Chain PVEFW-smurflog (2 references)
target prot opt source destination
DROP all -- anywhere anywhere
all -- anywhere anywhere /* PVESIG:2gfT1VMkfr0JL6OccRXTGXo+1qk */
Chain PVEFW-smurfs (2 references)
target prot opt source destination
RETURN all -- 0.0.0.0 anywhere
PVEFW-smurflog all -- anywhere anywhere [goto] ADDRTYPE match src-type BROADCAST
PVEFW-smurflog all -- base-address.mcast.net/4 anywhere [goto]
all -- anywhere anywhere /* PVESIG:HssVe5QCBXd5mc9kC88749+7fag */
Chain PVEFW-tcpflags (0 references)
target prot opt source destination
PVEFW-logflags tcp -- anywhere anywhere [goto] tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,PSH,URG
PVEFW-logflags tcp -- anywhere anywhere [goto] tcp flags:FIN,SYN,RST,PSH,ACK,URG/NONE
PVEFW-logflags tcp -- anywhere anywhere [goto] tcp flags:SYN,RST/SYN,RST
PVEFW-logflags tcp -- anywhere anywhere [goto] tcp flags:FIN,SYN/FIN,SYN
PVEFW-logflags tcp -- anywhere anywhere [goto] tcp spt:0 flags:FIN,SYN,RST,ACK/SYN
all -- anywhere anywhere /* PVESIG:CMFojwNPqllyqD67NeI5m+bP5mo */
VM level
Code:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere anywhere ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere !localhost/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 172.20.0.0/16 anywhere
MASQUERADE all -- 172.17.0.0/16 anywhere
MASQUERADE tcp -- 172.17.0.2 172.17.0.2 tcp dpt:9000
MASQUERADE tcp -- 172.17.0.2 172.17.0.2 tcp dpt:8000
MASQUERADE tcp -- 172.20.0.2 172.20.0.2 tcp dpt:https
MASQUERADE tcp -- 172.20.0.2 172.20.0.2 tcp dpt:http
Chain DOCKER (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere
RETURN all -- anywhere anywhere
DNAT tcp -- anywhere anywhere tcp dpt:9000 to:172.17.0.2:9000
DNAT tcp -- anywhere anywhere tcp dpt:8000 to:172.17.0.2:8000
DNAT tcp -- anywhere anywhere tcp dpt:https to:172.20.0.2:443
DNAT tcp -- anywhere anywhere tcp dpt:http to:172.20.0.2:80
I run a
Code:
dig +short myip.opendns.com @resolver1.opendns.com
Last edited: