If there is a tool we love, it is called iptables. The default firewall tool chain on Linux has a lot of options to filter pretty much any traffic you wish.
In this Tips and Tricks, we will show you how to block DNS requests (domain names) via iptables. Enjoy!
Continue reading “Tips and Tricks: Blocking DNS requests via Iptables”
If you ever wondered what is going on at the DNS level on your computer (or network), tcpdump can be a useful tool for you.
Tcpdump is a tool that allows you to inspect any packet (TCP, UDP, etc) and its content as they pass through an interface through the libpcap module. The syntax is very simple, but the basics of the command require the network interface name, the protocol and the restrictions of what you are trying to inspect (more on that later):
Continue reading “Inspecting DNS traffic via tcpdump”
In a previous article, we showed how to block specific domains at the DNS level using iptables. Today, we will expand into that and show how to also block HTTP requests for a specific domain (or URL) in there.
Iptables String Matching
Iptables string matching is very powerful and easier to use than the hex-string module we used before. When you specify -m string –string, it will activate the string module and inspect at the packet content for the keyword you are looking for.
Continue reading “Blocking HTTP requests via Iptables for a specific domain”
Most servers get a IPv6 range (/64) by default. That means that you have millions of IP addresses to use for whatever you feel like. However, assigning them manually to your interfaces can be a bit painful.
Assigning all /64 IPv6 addresses with 1 command
However, there is a trick with the ip route command that allows you to link your /64 to the local interface and cover all of them automatically:
Continue reading “Binding multiple IPv6 addresses automatically”