Forum Discussion

mansourb1's avatar
mansourb1
Copper Contributor
Dec 13, 2023

Redirection pulic IP adress of vm azure to local adress on premise

Hello,

 

I have VM on azure and other one on premise,  the VM on premise access to antenna, which is located in premise,

and I have installed VPN between vm azure and vm on premise,

 

Antenna on premise:   ip 10.10.18.2

Vm on premise:  ip 10.10.19.3    ……………………………………       there is connection between antenna and vm on premise.

Vm  on azure:    ip 10.10.19.2 ,  Public address : 10.40.40.40  ………………….. Ther is connection between vm azure to antenna ( I have set route 10.10.18.0 to 10.10.19.0).

 

 I want to access to this antenna from synapse by Rest API service,  so I wonder how i can redirect public address of vm on azure to local address of antenna on premise through   vm azure?

 

 

 

1 Reply

  • How about using Reverse Proxy on Azure VM

    Step 1: Install a Reverse Proxy

    On your Azure VM (10.10.19.2), install a lightweight reverse proxy like:

    • Nginx
    • Apache HTTP Server
    • Caddy
    • Or even a custom Node.js/Flask app if you prefer.

    Step 2: Configure Proxy Rules

     

    server {
        listen 80;
        location / {
            proxy_pass http://10.10.18.2;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
        }
    }

    This will forward all HTTP traffic from the Azure VM’s public IP to the antenna.

    Step 3: Open Firewall Ports

    • Ensure port 80 or 443 is open on the Azure VM’s NSG (Network Security Group).
    • Confirm that your on-prem antenna allows traffic from 10.10.19.2.

    Step 4: Test from Synapse

    • From Synapse, call http://10.40.40.40/api/...
    • The Azure VM will proxy the request to http://10.10.18.2/api/... via VPN.

Resources