my server has 5 IPs (192.168.0.23, 192.168.0.12, 192.168.0.13, 192.168.0.14 and 192.168.0.15).
The IP 192.168.0.23 is real and the others are virtual.
I´d like to block all ports in 192.168.0.12 except port 53 (udp and tcp).
All computers from my network can access all ips from this server but through ip 192.168.0.12 they can access only the port 53 (udp and tcp).
How can use iptables to block all ports in 192.168.0.12 except port 53 udp and tcp?
Thank you.
you should consider in what chain the rule must be added(INPUT/OUTPUT/FORWARD) but something like this does so: