How to restrict access to some public websites

冷暖自知 提交于 2019-12-25 09:40:21

问题


I am new to cloud computing. Sorry if this is a silly question. I have created a VM from azure portal. My requirement is not to allow the user using the VM to access public website. Can anyone help me how to achieve this functionality?

Thanks


回答1:


You probably have a Network Security Group that was created when you created the VM. In there you can specify rules for inbound and outbound data traffic.

Find the NSG and add a rule that blocks all outbound traffic from the VM. You should still be able to connect to the VM, it just can't connect anywhere. You can also make the rule only block traffic bound to the internet if you still wish for it to have access to other machines in the same virtual network.

Network Security Groups documentation: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-nsg




回答2:


My requirement is not to allow the user using the VM to access public website.

According to your description, you just want user can't access the public website, as we know website common listen on 80 and 443, so we can add outbound rules to deny port 443, 80 and port 8080 to achieve this functionality.

I deny port 80, 443 and 8080, then my VM can't access https://google.com and http://google.com.

Update:



来源:https://stackoverflow.com/questions/44357371/how-to-restrict-access-to-some-public-websites

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!