[SOLVED] Wordpress VM Portforwarding issue

Sikjairi

Well-Known Member
Jan 7, 2020
32
44
58
36
Africa
Hello Proxmox experts ,
I have an issue with my wordpress Vm , i can't acces to it from internet even i configured the file /etc/network/interfaces with the command line bellow , could you help me please .

########## /etc/network/interfaces
#post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 8076 -j DNAT --to localip:80
#post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 8076 -j DNAT --to localip:80

####### NB : am working behind a public Apache Proxy ( My domain ==> Apache proxy IP ==> Proxmox Public IP ==> Wordpress Local IP )
<VirtualHost *:80> ServerName mydomain.net ProxyPass / http://PublicProxmoxIP:8076/ #ProxyPassReverse / http://PublicProxmoxIP:8076/ #ProxyPreserveHost On </VirtualHost>
 
hi,
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 8076 -j DNAT --to localip:80
the -i input interface should be the bridged interface for your vmbr0, and the localip should be your wordpress vm's IP address