Access public ip port from VM lan

itreers

New Member
Mar 15, 2018
3
0
1
43
Hi. I have a problem with my Jira VM.

I need that jira with lan address 192.168.1.118 can resolve own dns name with proxmox public ip and access port 443 on it.
How to achieve this?
 
AFAIU you want to acces jira in local LAN via public IP - configure simply port forwarding
Code:
iptables -t nat A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 192.168.1.118
Possibly you have to adapt also server settings in the VM for proper access via FQDN too.
 
  • Like
Reactions: itreers
443 port already redirected to nginx reverse proxy. In my lan I have another vm's with sites (near 30). Jira listen 8080 on lan ip.
 
443 port already redirected to nginx reverse proxy. In my lan I have another vm's with sites (near 30). Jira listen 8080 on lan ip.
In other words you want two different servers have to be able to be accessed via the same public IP and port only selected by the used FQDN. The solution is to use "virtual hosts" (as apache calls this method), see e.g. https://httpd.apache.org/docs/2.4/vhosts/examples.html
 
In other words you want two different servers have to be able to be accessed via the same public IP and port only selected by the used FQDN. The solution is to use "virtual hosts" (as apache calls this method), see e.g. https://httpd.apache.org/docs/2.4/vhosts/examples.html

Sorry for my english but I will try to explain.
I have VM with nginx proxy in LAN segment where Jira located. From WAN ip of proxmox - port 443 redirected to LAN ip of proxy where nginx proxy forward requests to jira LAN ip port 8080. For example WAN ip (proxmox) 22.22.22.22:443 -> (nginx proxy) 192.168.1.10:443 and routing by domain name to -> (jira server) 192.168.1.200:8080. For example. Jira have address jira.example.com (22.22.22.22) and another server confluence.example.com (22.22.22.22) both in same LAN segment on same Proxmox host. For application linking they must resolve each other domain and access ports 8080 (for jira) and 8090 (confluence). I solve this with internal DNS that redefine DNS records for jira and confluence with LAN ips. Application linking working. But for corrects work of gardets URL in Jira base url (https://jira.example.com) port 443 must be accessible from jira server itself but it can't because it has LAN sergment IP in DNS and jira server don't have 443 port configured on jira LAN ip. It configured on nginx proxy.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!