Playing Around with IPv6 Tables
In this guide, we will delve into the world of IPv6 tables, specifically focusing on the ip6tables command. We'll demonstrate how to create rules for incoming packets, set up packet filtering based on source IPv6 addresses, and monitor the network traffic using tcpdump.
Understanding IPv6 Tables
IPv6 tables are a crucial part of the Linux firewall system. They allow administrators to control and manage network traffic by defining rules for incoming and outgoing packets. The ip6tables command is the primary tool for configuring these tables.
Setting Up IPv6 Tables
Before we start, ensure that your system supports IPv6. To check this, run:
ip -6 addr show scope global
If your system has an IPv6 address, it will be displayed. If not, you may need to enable IPv6 support.
Now, let's set up our IPv6 tables:
sudo ip6tables -A INPUT -d fe80::xxxx:xxxx:xxxx:xxxx -j DROP
Replace fe80::xxxx:xxxx:xxxx:xxxx with the IPv6 address you wish to block.
Monitoring Network Traffic
To monitor the network traffic, we'll use tcpdump. Here's how to follow the traffic to the IPv6 address we just blocked:
sudo tcpdump -i eth0 -nn -vvv -c 10 host fe80::xxxx:xxxx:xxxx:xxxx
Replace fe80::xxxx:xxxx:xxxx:xxxx with the IPv6 address you're interested in.
Testing the Setup
Now, let's test our setup by sending a ping to the IPv6 address we blocked:
ping6 fe80::xxxx:xxxx:xxxx:xxxx
Since we have a rule to drop packets from this address, the ping should be dropped, and you should see the dropped packets in your tcpdump output.
Summary
In this guide, we learned how to play around with IPv6 tables using the ip6tables command and tcpdump. We set up a rule to drop packets from a specific IPv6 address and monitored the network traffic to observe the dropped packets.
References