VM上的Azure网站:如何仅允许访问印度的IP地址 [英] Azure website on a VM: how to allow access only to IP addresses in India

查看:141
本文介绍了VM上的Azure网站:如何仅允许访问印度的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Centos Azure VM上有一个网站.有没有办法只允许访问印度的IP地址.

I have a website on Centos Azure VM. Is there a way to allow access, only to IP Addresses in India.

除了从应用程序控制IP之外,我们还可以像使用NSG之类的那样从服务器端或Portal对其进行限制

Rather than controlling the IPs from application can we restrict it from Server end or from Portal like using NSG's or something

推荐答案

As您提到的,您将要使用Azure网络安全组来做到这一点.

As you mentioned, you will want to do this using Azure Network Security Groups. 

您可以添加一个范围的IP地址以允许VM使用,然后拒绝所有其他IP.

You can add a range of IP address to allow to the VM and then deny all other IPs. 

诀窍是找到印度的所有IP范围.

The trick will be finding all the IP ranges from India. 

您可以在网上查找此信息,但这可能并不总是准确的,这可能意味着您要访问您的VM的某些人将无法访问.

You can look this up online but it might not always be accurate which may mean some people you want to access your VM will not be able to. 

如果您要允许访问虚拟机的特定人群,也可以将他们的特定IP地址添加到允许规则中

If you have a specific set of people you want to allow access to the VM you can also just add their specific IP address to the allow rule instead

https://docs.microsoft.com/en-us/azure/virtual -network/security-overview


这篇关于VM上的Azure网站:如何仅允许访问印度的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆