Would you like to learn how to block Netflix access on Ubuntu Linux? In this tutorial, we are going to show you how to configure Iptables to block Netflix access using STRINGS on Ubuntu Linux version 17.

Hardware List:

The following section presents the list of equipment used to create this Ubuntu Linux tutorial.

Every piece of hardware listed above can be found at Amazon website.

Ubuntu Playlist:

On this page, we offer quick access to a list of videos related to Ubuntu Linux.

Don’t forget to subscribe to our youtube channel named FKIT.

Ubuntu Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Ubuntu linux.

Tutorial – Block Netflix on Ubuntu Linux

We have two options to block Netflix access on Linux.

In our first example, the Iptables command will be used to block DNS packages only, this way a computer will not be able to translate www.netflix.com to the IP address and will not be able to access Netflix.

# iptables -I INPUT -p udp -m udp –sport 53 -m string –algo bm –icase –string “netflix” -j DROP
# iptables -I FORWARD -p udp -m udp –dport 53 -m string –algo bm –icase –string “netflix” -j DROP
# iptables -I OUTPUT -p udp -m udp –dport 53 -m string –algo bm –icase –string “netflix” -j DROP

Wait a couple of minutes for the DNS cache to expire and try to ping to netflix.com.

The system should not be able to translate any address that contains the Netflix word to IP address.

Block netflix DNS

Your browser should not be able to access the Netflix website.

Block netflix Browser

In our second example, the Iptables command will be used to block any network packages that contain the word Netflix.

# iptables -I INPUT -m string –algo bm –string “netflix” -j DROP
# iptables -I FORWARD -m string –algo bm –string “netflix” -j DROP
# iptables -I OUTPUT -m string –algo bm –string “netflix” -j DROP

Be careful with the second example, because it will block everything with the Netflix word.

It will block websites with the word Netflix.

It will block e-mails with the word Netflix.

You should customize the second example to match your needs.