1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-ipp2p-1.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustIPP2P mezzanine_patched_smeserver-ipp2p-1.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustIPP2P |
2 |
--- smeserver-ipp2p-1.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustIPP2P 1969-12-31 17:00:00.000000000 -0700 |
3 |
+++ mezzanine_patched_smeserver-ipp2p-1.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustIPP2P 2007-01-09 11:11:01.000000000 -0700 |
4 |
@@ -0,0 +1,17 @@ |
5 |
+ |
6 |
+ /sbin/iptables --flush ipp2p_block |
7 |
+ # Block p2p protocols |
8 |
+{ |
9 |
+ foreach $service ('ipp2p','bit','apple','winmx','soul','ares') |
10 |
+ { |
11 |
+ $proto = $ipp2p{$service} || 'disabled'; |
12 |
+ if ( $proto ne 'disabled' ) { |
13 |
+ $OUT .= " /sbin/iptables -A ipp2p_block "; |
14 |
+ $OUT .= "-p tcp " if $proto eq 'tcp'; |
15 |
+ $OUT .= "-p udp " if $proto eq 'udp'; |
16 |
+ $OUT .= "-m ipp2p --$service -j denylog\n"; |
17 |
+ } else { |
18 |
+ $OUT .= " # ipp2p ($service) disabled\n"; |
19 |
+ } |
20 |
+ } |
21 |
+} |