1 @def $myports= (http ftp);
2 @def &mytcp() = proto $myports;
3 @def &myrule() = proto ah DROP;
9 @def &proto_port($a, $b) = proto $a dport $b;
11 @def &TCP_TUNNEL($port, $dest) = {
12 table filter chain FORWARD interface ppp0 proto tcp dport $port daddr $dest outerface eth0 ACCEPT;
13 table nat chain PREROUTING interface ppp0 proto tcp dport $port daddr 1.2.3.4 DNAT to $dest;
21 proto tcp dport (https $myports ntp) REJECT;
24 chain FORWARD &proto_port(tcp, http) ACCEPT;
26 &proto_port(udp, domain) ACCEPT;
27 &proto_port(tcp, (8080 3128)) REJECT;
28 &proto_port(tcp, $myports) ACCEPT;
31 &TCP_TUNNEL(http, 192.168.1.33);
32 &TCP_TUNNEL(ftp, 192.168.1.30);
33 &TCP_TUNNEL((ssh smtp), 192.168.1.2);