Home
Operating System
Windows
Linux
Tutorial
Windows Server
About
☰
DHCP reservation + DNS block website
# DHCP Reservation
Add-DhcpServerv4Reservation ` -ScopeId "172.31.255.0" ` -IPAddress "172.31.255.9" ` -ClientId "80-B6-55-8E-46-3F" ` -Name "client_block_fb" ` -Description "Block Facebook Client"
✏️ Edit
📋 Copy
Copied!
# Check it:
Get-DhcpServerv4Reservation -ScopeId "172.31.255.0"
✏️ Edit
📋 Copy
Copied!
# Create a DNS block zone for Facebook
Add-DnsServerPrimaryZone -Name "facebook.com" -ReplicationScope Domain Add-DnsServerResourceRecordA ` -ZoneName "facebook.com" ` -Name "@" ` -IPv4Address "0.0.0.0" Add-DnsServerResourceRecordA ` -ZoneName "facebook.com" ` -Name "*" ` -IPv4Address "0.0.0.0"
✏️ Edit
📋 Copy
Copied!
# Renew DHCP on the client
ipconfig /release ipconfig /renew ipconfig /flushdns
✏️ Edit
📋 Copy
Copied!
Labels
all
(28 )
autocad
(3 )
css
(2 )
linux
(5 )
op_system
(18 )
website
(4 )
windows
(14 )
windowsServer
(24 )