I want to enable the entire subnet 192.168.1.0/24 which is connected to eth0 in input. I'm very unfamiliar with iptables.
If I add the rule:
# iptables -A INPUT -s 192.168.1.0/24 -p tcp -m tcp --dport 45678 -j ACCEPT
it works on ONE port. But we want all ports open to our subnet (both tcp and udp), so I tried:
# iptables -A INPUT -i eth0 -j ACCEPT
But it fails (no error, we simply cannot connect). What is the correct syntax ?