User defined chains to reduce/make more readable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I define this chain:

-N RESTRICT-HOST
-A RESTRICT-HOST -p icmp -j ACCEPT
-A RESTRICT-HOST -p udp --dport 123 -j ACCEPT
-A RESTRICT-HOST -p udp --sport 32769:65535 --dport 33434:33523 -j ACCEPT
-A RESTRICT-HOST -j LOG --log-prefix "xxx: " --log-level 7
-A RESTRICT-HOST -j REJECT

and would use it like this:

-A FORWARD -i eth0 -o eth1 -s 192.168.1.1 -j RESTRICT-HOST
-A FORWARD -i eth0 -o eth1 -s 192.168.11.11 -j RESTRICT-HOST
-A FORWARD -i eth0 -o eth1 -s 192.168.111.111 -j RESTRICT-HOST

where eth0 is the LAN port and eth1 the WAN port of the router

is there a possibility where I can change these rules similar to these:

-A FORWARD -i eth0 -o eth1 -s 192.168.1.1 -j RESTRICT-HOST "game-pc: "
-A FORWARD -i eth0 -o eth1 -s 192.168.11.11 -j RESTRICT-HOST "office-pc: "
-A FORWARD -i eth0 -o eth1 -s 192.168.111.111 -j RESTRICT-HOST "tablet-pc: "

and a rule in the chain takes "game-pc: " instead of this "xxx: " as given
above?

Thanks,
Walter


--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux