I have 4 virtual machines using virtual box. One virtual machine work as a router that connects 3 networks. Im trying to drop all communications entering the router machine, excpet for some services. The interfaces ips that I have in each machine are:
Virtual machine 1 that work as router:
eth1: 193.136.200.254
eth2: 10.10.0.254
eth3: 10.254.0.254
Virtual machine 2:
eth1: 10.10.0.2
eth2: 10.10.0.3
Virtual machine 3:
eth1: 193.136.200.2
Virtual machine 4:
eth1: 10.254.0.1
I define the rules below on the router machine:
IPTABLES -P INPUT DROP
iptables -A INPUT -s 193.136.200.3 -d 193.136.200.254 -p udp -m udp --sport 53 -j ACCEPT
And now Im trying to test if this is working using netcat. So in the router machine Im running the command:
nc -u -s 193.136.200.254 -p 53 193.136.200.3 53
And in thevirtual machine 3 Im running:
nc -u 193.136.200.3 53
Then I write a random word in one machine but it is not appearing in the other machine. So it isnt working. Do you know what is wrong?