Community discussions

MikroTik App
 
mugeno
just joined
Topic Author
Posts: 1
Joined: Thu Apr 11, 2024 2:31 am

Public IP on Azure CHR

Thu Apr 11, 2024 2:38 am

I'm trying to setup a CHR router on Azure and would like for it to have a public IP address on the WAN interface instead of the private IP that Azure assigns to it.

A bit of a background.
We have a setup where where we have remote multiple sites using Mikrotik routers and these routers have a site-to-site connection with a CHR that is currently configured in a private cloud. That CHR has a public IP address attached to the WAN interface and uses that IP to establish to VPN connection with it's remote sites.

We plan to move the CHR router to our Azure subscription for easier management of all devices, however as the Azure CHR has a private IP address, it is not able to establish the VPN tunnel.

I've tried to assign a second public IP address to the second interface created and created a default route via that interface but ping test fails from that interface.
 
User avatar
Maxohio
just joined
Posts: 4
Joined: Thu Sep 05, 2019 1:31 pm

Re: Public IP on Azure CHR

Thu Apr 11, 2024 5:53 pm

I think you can edit the IP configuration under the Network Interface of the specified VM. Under IP configuration you may associate a public IP address. An enabled DHCP client on the WAN interface is needed to recieve the public IP from Microsoft pool. You may have to restart the virtual machine for this.

#Edit
Seems that its not possible to assing the public IP adres directly to the network adapter of the virtual machine, NAT is always in between.
 
FurfangosFrigyes
newbie
Posts: 47
Joined: Sun Feb 25, 2018 11:45 am

Re: Public IP on Azure CHR

Thu Apr 11, 2024 8:13 pm

I'm trying to setup a CHR router on Azure and would like for it to have a public IP address on the WAN interface instead of the private IP that Azure assigns to it.

A bit of a background.
We have a setup where where we have remote multiple sites using Mikrotik routers and these routers have a site-to-site connection with a CHR that is currently configured in a private cloud. That CHR has a public IP address attached to the WAN interface and uses that IP to establish to VPN connection with it's remote sites.

We plan to move the CHR router to our Azure subscription for easier management of all devices, however as the Azure CHR has a private IP address, it is not able to establish the VPN tunnel.

I've tried to assign a second public IP address to the second interface created and created a default route via that interface but ping test fails from that interface.
Azure networking is a bit tricky!
This is an SDN where you have only private IP. If you would like to add a public IP you should set up the IP forwarding, this is a must have if you are using an NVA on Azure. The public IP will be attached to your Mikrotik but it will be a simple port forward where you can control the PAT via Network Security Group (NSG)

So you will have one Virtual Adapter with a private IP and a public IP that will forward all traffic to your private IP that is not blocked by NSG. If you would like to use BGP you have to install an Azure Route Server to exchange the routes.

The Mikrotik/NVA has to be in a Gateway subnet and you have to add a Route Table to other subnets and create custom routes if you do not use BGP. (The Azure Route Server is expensive so it is a good practice if you add the routes manually if it is not a complex environment.)
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1620
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: Public IP on Azure CHR

Thu Apr 11, 2024 8:39 pm

@mugeno - if you've already paid for it and obtained the public IP address, this guide serves as a good starting point: "Microsoft - Associate a public IP address to a virtual machine". Here is some other good stuff about Azure networking: https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/

Who is online

Users browsing this forum: No registered users and 14 guests