I am seeing these lines when I list like iptables -v -L
pkts bytes target prot opt in out source destination 0 0 DROP udp -- vlan2 any anywhere anywhere udp dpt:route 0 0 DROP udp -- br0 any anywhere anywhere udp dpt:route 0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:routeThis seems a bit contradictory to mean because it seems like it is accepting and dropping at the same. The last rule also seems a bit unsafe to me but it was there on the default installation on DD-WRT so I don't think I'm understanding what it's there for in the first place. I couldn't find any documentation on what dpt:route means. Thanks for any clarifications
21 Answer
dpt:route means match packets with the destination port associated with the route service. To map a service to a port number take a look at /etc/services. From that we get:
$ cat /etc/services | grep route
route 520/udp router routed # RIPThis seems a bit contradictory to mean because it seems like it is accepting and dropping at the same.
The rules are not contradictory because they have one key difference - the input interface: vlan2, br0 and any for each of the respective rules. So taken together the rules are saying to drop all RIP packets that arrive from vlan2 and br0 but accept RIP packets that arrive from all other interfaces.