So i created a network namespace named client, and another namespace called server. I also create virtual ethernets to connect them.
ip netns add client
ip netns add server
ip link add v-client type veth peer name v-server
Then i connect them
ip link set v-client netns client
ip link set v-server netns server
I assign IPs to them and set them UP:
ip netns exec client ip addr add 192.0.2.0/24 dev v-client
ip netns exec server ip addr add 192.0.2.128/24 dev v-server
ip netns exec client ip link set v-client up
ip netns exec server ip link set v-server up
So far so good. What i want to do is i want to put a firewall between these two. For instance if client tries to ping the server, the firewall is not going to allow it. I WANT THE FIREWALL AS A SEPERATE NAMESPACE. I want a third network namespace named firewall, which controls the traffic between server and client. How can i achieve this?