Iptables What Does Dpt: Route Mean?

Iptables What Does Dpt: Route Mean?

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:route

This 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

2

1 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   # RIP

This 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.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.