Skip to content

Commit

Permalink
Update how-to-block-any-ip-address-in-mac.md
Browse files Browse the repository at this point in the history
  • Loading branch information
summercms authored Sep 10, 2023
1 parent c7985b5 commit 2c4edc8
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion docs/how-to-block-any-ip-address-in-mac.md
Original file line number Diff line number Diff line change
@@ -1 +1,55 @@
x
## How To Block Any IP Address In MAC

The easiest way to block IP addresses on a Mac is to block them for your entire network via your router. If you want to block an IP address on just your Mac, use the Terminal to create a new rule in your PacketFilter Configuration file.

1. Find the IP address you want to block from the list found here: https://github.com/Summer-CMS-Vendor-Packages/sc-block-bad-crypto-filter-lists/blob/master/src/lists/ip.txt

2. [Open Terminal](#) and enter the following to open the PacketFilter Configuration file:

```
$ sudo vim /etc/pf.conf
```

3. Enter the following, replacing *IP address* with the address you want to block (for example, 69.63.176.13).

```
block drop from any to IP ADDRESS
```

To block a range of addresses, replace *any* with an IP address. For example:

```
block drop from 66.220.144.0 to 66.220.159.255
```

4. Enter the following to enable the packet filter and load the rule you created:

```
$ pfctl -e -f /etc/pf.conf
```

5. The IP address is blocked. To disable the rule, enter this command:

```
$ pfctl -d
```

### How to Open Terminal on Mac

Terminal typically resides on the Dock. The icon resembles a command-line input screen with a white > (greater than) symbol set against a black background.

xxx

You can also access the Terminal app through the Launchpad.

1. Click the "rocket" icon located on the Dock. This opens the MacOS Launchpad.

xxx

2. Click the **Other** folder.

xxx

3. Click the **Terminal** app.

xxx

0 comments on commit 2c4edc8

Please sign in to comment.