Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

What is Port Blocking within LAN ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Port Blocking is the action performed by an Internet Service Provider (ISP) to identify and block the Internet traffic by using the Port Number and Transfer Protocol.

Port Blocking within LAN refers to restricting the users from accessing a set of Services within the local area network. This may include blocking physical ports like USB, removable devices, DVD/CD-ROM, floppy, smartphones, and many such plug-and-play devices.

Need of Port Blocking within LAN

Consider a scenario where DHCP service is enabled within your network. Now if any user with a laptop connects the LAN cable with your device, with this connectivity that user can get your IP address from the DHCP and can access your network resources. So to avoid this if port security can be enabled within the LAN, then whenever the port gets mismatched with the MAC-Address, the switch will shut the port off and the anonymous user will not get the IP.

Example: Suppose we want to block a switch port with a particular MAC address. Consider we have an 8-port switch, now if we connect a machine having MAC Address suppose 2c.54.91.88.c9.e3 and we block the switch port with this address, whenever a foreign mac address other than the above one is detected, your switch will cut the connection off and your machine will be secured.

The data transmission takes place through some specific ports. For routing the traffic, Computer uses port numbers. Some ports use Transmission Control Protocol (TCP) whereas some use User datagram protocol (UDP). These protocols determine the data transmission i.e. how the data should be transferred once computers are connected to each other over a network.

Steps to Block Ports on Computer 

1. Go to Start -> Control Panel -> System and Security -> Windows Firewall.

2. Select ‘Advance Settings’ -> ‘Inbound Rules’ (to block an inbound port)’ OR ‘Outbound Rules’ (to block an outbound port).

3. Select ‘New Rule‘  choose  ‘Port‘  from options and click Next.

4. Choose ‘TCP‘ or ‘UDP‘ and click on ‘Specific Local Ports‘.

5. Enter the Port Number and click ‘Next‘.

6. Click ‘Block the Connection‘ and then click ‘Next‘. Choose the network location (public, private, domain) on which the rule applies and click ‘Next‘.

7. Create a Rule name and add a description for it. Click on ‘finish‘ to block ports on a computer.

Impact of blocking 

Many of the ports are usually associated with the windows application. they appeal to the hackers because of the lack of expertise in system administration and network security.

The services which are used by these ports are not meant to be used across a wide area network or between the management domains; so blocking the port will not impact the properly designed applications except a few older applications.


1. Port Blocking within LAN helps prevent unwanted data from entering your computer.

2. Faster network.


1. Improper functionality of applications since applications lose access to the ports which are supposed to be used by them for proper working.

2. It complicates the process of designing and developing an application and creates unreliability about whether the product or application will properly work or not.

My Personal Notes arrow_drop_up
Last Updated : 17 Dec, 2021
Like Article
Save Article
Similar Reads
Related Tutorials