diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 3cdb36fbd..41643d8d7 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -1030,4 +1030,27 @@ sub RedIsWireless() { return 0; } +# Function to read a file with UTF-8 charset. +sub read_file_utf8 ($) { + my ($file) = @_; + + open my $in, '<:encoding(UTF-8)', $file or die "Could not open '$file' for reading $!"; + local $/ = undef; + my $all = <$in>; + close $in; + + return $all; +} + +# Function to write a file with UTF-8 charset. +sub write_file_utf8 ($) { + my ($file, $content) = @_; + + open my $out, '>:encoding(UTF-8)', $file or die "Could not open '$file' for writing $!";; + print $out $content; + close $out; + + return; +} + 1; diff --git a/config/menu/30-network.menu b/config/menu/30-network.menu index f4645b8fc..c50508f81 100644 --- a/config/menu/30-network.menu +++ b/config/menu/30-network.menu @@ -35,37 +35,37 @@ 'title' => "$Lang::tr{'edit hosts'}", 'enabled' => 1, }; - $subnetwork->{'51.routes'} = { + $subnetwork->{'51.dnsmenu'} = { + 'caption' => $Lang::tr{'dns menu'}, + 'uri' => '/cgi-bin/dns.cgi', + 'title' => "$Lang::tr{'dns menu'}", + 'enabled' => `grep "RED_TYPE=DHCP" /var/ipfire/ethernet/settings`, + }; + $subnetwork->{'52.dnsforward'} = { + 'caption' => $Lang::tr{'dnsforward'}, + 'uri' => '/cgi-bin/dnsforward.cgi', + 'title' => "$Lang::tr{'dnsforward'}", + 'enabled' => 1 + }; + $subnetwork->{'60.routes'} = { 'caption' => $Lang::tr{'static routes'}, 'uri' => '/cgi-bin/routing.cgi', 'title' => "$Lang::tr{'static routes'}", 'enabled' => 1, }; - $subnetwork->{'60.upload'} = { - 'caption' => $Lang::tr{'upload'}, - 'uri' => '/cgi-bin/upload.cgi', - 'title' => "$Lang::tr{'upload'}", - 'enabled' => 0, - }; $subnetwork->{'70.aliases'} = { 'caption' => $Lang::tr{'aliases'}, 'uri' => '/cgi-bin/aliases.cgi', 'title' => "$Lang::tr{'aliases'}", 'enabled' => `grep "RED_TYPE=STATIC" /var/ipfire/ethernet/settings`, }; - $subnetwork->{'80.dnsmenu'} = { - 'caption' => $Lang::tr{'dns menu'}, - 'uri' => '/cgi-bin/dns.cgi', - 'title' => "$Lang::tr{'dns menu'}", - 'enabled' => `grep "RED_TYPE=DHCP" /var/ipfire/ethernet/settings`, - }; - $subnetwork->{'90.macadressmenu'} = { + $subnetwork->{'80.macadressmenu'} = { 'caption' => $Lang::tr{'mac address menu'}, 'uri' => '/cgi-bin/mac.cgi', 'title' => "$Lang::tr{'mac address menu'}", 'enabled' => 1, }; - $subnetwork->{'99.wakeonlan'} = { + $subnetwork->{'90.wakeonlan'} = { 'caption' => $Lang::tr{'WakeOnLan'}, 'uri' => '/cgi-bin/wakeonlan.cgi', 'title' => "$Lang::tr{'WakeOnLan'}", diff --git a/config/rootfiles/common/misc-progs b/config/rootfiles/common/misc-progs index 3f48f8376..a8dac5972 100644 --- a/config/rootfiles/common/misc-progs +++ b/config/rootfiles/common/misc-progs @@ -3,6 +3,7 @@ usr/local/bin/addonctrl usr/local/bin/backupctrl #usr/local/bin/clamavctrl usr/local/bin/dhcpctrl +usr/local/bin/dnsmasqctrl usr/local/bin/extrahdctrl usr/local/bin/fireinfoctrl usr/local/bin/getconntracktable diff --git a/config/rootfiles/common/snort b/config/rootfiles/common/snort index 840448653..e35838d03 100644 --- a/config/rootfiles/common/snort +++ b/config/rootfiles/common/snort @@ -3,6 +3,7 @@ etc/snort/rules #etc/snort/rules/classification.config #etc/snort/rules/reference.config etc/snort/snort.conf +etc/snort/snort.conf.template etc/snort/unicode.map usr/bin/u2boat usr/bin/u2spewfoo @@ -179,7 +180,6 @@ usr/sbin/snort #usr/share/doc/snort/README.dnp3 #usr/share/doc/snort/README.dns #usr/share/doc/snort/README.event_queue -#usr/share/doc/snort/README.file #usr/share/doc/snort/README.filters #usr/share/doc/snort/README.flowbits #usr/share/doc/snort/README.frag3 diff --git a/config/rootfiles/common/usb_modeswitch_data b/config/rootfiles/common/usb_modeswitch_data index 448a19ea8..a454c61e3 100644 --- a/config/rootfiles/common/usb_modeswitch_data +++ b/config/rootfiles/common/usb_modeswitch_data @@ -5,20 +5,24 @@ usr/share/usb_modeswitch/03f0:002a usr/share/usb_modeswitch/0408:f000 usr/share/usb_modeswitch/0421:060c usr/share/usb_modeswitch/0421:0610 +usr/share/usb_modeswitch/0421:0618 usr/share/usb_modeswitch/0421:061d usr/share/usb_modeswitch/0421:0622 usr/share/usb_modeswitch/0421:0627 usr/share/usb_modeswitch/0421:062c +usr/share/usb_modeswitch/0421:0632 usr/share/usb_modeswitch/0421:0637 usr/share/usb_modeswitch/0471:1210:uMa=Philips usr/share/usb_modeswitch/0471:1210:uMa=Wisue usr/share/usb_modeswitch/0471:1237 usr/share/usb_modeswitch/0482:024d usr/share/usb_modeswitch/04bb:bccd +usr/share/usb_modeswitch/04cc:225c usr/share/usb_modeswitch/04e8:680c usr/share/usb_modeswitch/04e8:689a usr/share/usb_modeswitch/04e8:f000:sMo=U209 usr/share/usb_modeswitch/057c:84ff +usr/share/usb_modeswitch/05c6:0010 usr/share/usb_modeswitch/05c6:1000:sVe=GT usr/share/usb_modeswitch/05c6:1000:sVe=Option usr/share/usb_modeswitch/05c6:1000:uMa=AnyDATA @@ -27,6 +31,7 @@ usr/share/usb_modeswitch/05c6:1000:uMa=DGT usr/share/usb_modeswitch/05c6:1000:uMa=Option usr/share/usb_modeswitch/05c6:1000:uMa=SAMSUNG usr/share/usb_modeswitch/05c6:1000:uMa=SSE +usr/share/usb_modeswitch/05c6:1000:uMa=StrongRising usr/share/usb_modeswitch/05c6:1000:uMa=Vertex usr/share/usb_modeswitch/05c6:2000 usr/share/usb_modeswitch/05c6:2001 @@ -83,6 +88,7 @@ usr/share/usb_modeswitch/0af0:8700 usr/share/usb_modeswitch/0af0:8800 usr/share/usb_modeswitch/0af0:8900 usr/share/usb_modeswitch/0af0:9000 +usr/share/usb_modeswitch/0af0:9200 usr/share/usb_modeswitch/0af0:c031 usr/share/usb_modeswitch/0af0:c100 usr/share/usb_modeswitch/0af0:d001 @@ -104,7 +110,7 @@ usr/share/usb_modeswitch/0cf3:20ff usr/share/usb_modeswitch/0d46:45a1 usr/share/usb_modeswitch/0d46:45a5 usr/share/usb_modeswitch/0df7:0800 -usr/share/usb_modeswitch/0e8d:0002 +usr/share/usb_modeswitch/0e8d:0002:uPr=MT usr/share/usb_modeswitch/0e8d:7109 usr/share/usb_modeswitch/0fce:d0cf usr/share/usb_modeswitch/0fce:d0e1 @@ -115,14 +121,19 @@ usr/share/usb_modeswitch/1004:607f usr/share/usb_modeswitch/1004:613a usr/share/usb_modeswitch/1004:613f usr/share/usb_modeswitch/1004:614e +usr/share/usb_modeswitch/1004:6156 usr/share/usb_modeswitch/1004:6190 +usr/share/usb_modeswitch/1004:61aa usr/share/usb_modeswitch/1004:61dd usr/share/usb_modeswitch/1004:61e7 usr/share/usb_modeswitch/1004:61eb +usr/share/usb_modeswitch/1004:6327 usr/share/usb_modeswitch/1033:0035 usr/share/usb_modeswitch/106c:3b03 usr/share/usb_modeswitch/106c:3b05 usr/share/usb_modeswitch/106c:3b06 +usr/share/usb_modeswitch/106c:3b11 +usr/share/usb_modeswitch/106c:3b14 usr/share/usb_modeswitch/1076:7f40 usr/share/usb_modeswitch/109b:f009 usr/share/usb_modeswitch/1199:0fff @@ -139,6 +150,7 @@ usr/share/usb_modeswitch/12d1:1449 usr/share/usb_modeswitch/12d1:14ad usr/share/usb_modeswitch/12d1:14b5 usr/share/usb_modeswitch/12d1:14b7 +usr/share/usb_modeswitch/12d1:14ba usr/share/usb_modeswitch/12d1:14c1 usr/share/usb_modeswitch/12d1:14c3 usr/share/usb_modeswitch/12d1:14c4 @@ -146,24 +158,33 @@ usr/share/usb_modeswitch/12d1:14c5 usr/share/usb_modeswitch/12d1:14d1 usr/share/usb_modeswitch/12d1:14fe usr/share/usb_modeswitch/12d1:1505 +usr/share/usb_modeswitch/12d1:151a usr/share/usb_modeswitch/12d1:1520 usr/share/usb_modeswitch/12d1:1521 usr/share/usb_modeswitch/12d1:1523 +usr/share/usb_modeswitch/12d1:1526 usr/share/usb_modeswitch/12d1:1553 usr/share/usb_modeswitch/12d1:1557 +usr/share/usb_modeswitch/12d1:155b +usr/share/usb_modeswitch/12d1:1805 usr/share/usb_modeswitch/12d1:1c0b +usr/share/usb_modeswitch/12d1:1c1b usr/share/usb_modeswitch/12d1:1c24 usr/share/usb_modeswitch/12d1:1d50 usr/share/usb_modeswitch/12d1:1da1 usr/share/usb_modeswitch/12d1:1f01 +usr/share/usb_modeswitch/12d1:1f03 +usr/share/usb_modeswitch/12d1:1f11 usr/share/usb_modeswitch/12d1:380b usr/share/usb_modeswitch/1307:1169 usr/share/usb_modeswitch/1410:5010 usr/share/usb_modeswitch/1410:5020 +usr/share/usb_modeswitch/1410:5023 usr/share/usb_modeswitch/1410:5030 usr/share/usb_modeswitch/1410:5031 usr/share/usb_modeswitch/1410:5041 usr/share/usb_modeswitch/1410:5059 +usr/share/usb_modeswitch/1410:7001 usr/share/usb_modeswitch/148e:a000 usr/share/usb_modeswitch/148f:2578 usr/share/usb_modeswitch/15eb:7153 @@ -173,6 +194,7 @@ usr/share/usb_modeswitch/16d8:6804 usr/share/usb_modeswitch/16d8:700a usr/share/usb_modeswitch/16d8:700b usr/share/usb_modeswitch/16d8:f000 +usr/share/usb_modeswitch/1726:f00e usr/share/usb_modeswitch/198a:0003 usr/share/usb_modeswitch/198f:bccd usr/share/usb_modeswitch/19d2:0003 @@ -181,16 +203,20 @@ usr/share/usb_modeswitch/19d2:0026 usr/share/usb_modeswitch/19d2:0031 usr/share/usb_modeswitch/19d2:0040 usr/share/usb_modeswitch/19d2:0053 +usr/share/usb_modeswitch/19d2:0083 usr/share/usb_modeswitch/19d2:0083:uPr=WCDMA usr/share/usb_modeswitch/19d2:0101 usr/share/usb_modeswitch/19d2:0103 usr/share/usb_modeswitch/19d2:0110 usr/share/usb_modeswitch/19d2:0115 +usr/share/usb_modeswitch/19d2:0120 usr/share/usb_modeswitch/19d2:0146 usr/share/usb_modeswitch/19d2:0149 +usr/share/usb_modeswitch/19d2:0150 usr/share/usb_modeswitch/19d2:0154 usr/share/usb_modeswitch/19d2:0166 usr/share/usb_modeswitch/19d2:0169 +usr/share/usb_modeswitch/19d2:0266 usr/share/usb_modeswitch/19d2:0325 usr/share/usb_modeswitch/19d2:1001 usr/share/usb_modeswitch/19d2:1007 @@ -203,9 +229,13 @@ usr/share/usb_modeswitch/19d2:1179 usr/share/usb_modeswitch/19d2:1201 usr/share/usb_modeswitch/19d2:1216 usr/share/usb_modeswitch/19d2:1224 +usr/share/usb_modeswitch/19d2:1227 usr/share/usb_modeswitch/19d2:1514 usr/share/usb_modeswitch/19d2:1517 usr/share/usb_modeswitch/19d2:1520 +usr/share/usb_modeswitch/19d2:1523 +usr/share/usb_modeswitch/19d2:1528 +usr/share/usb_modeswitch/19d2:1542 usr/share/usb_modeswitch/19d2:2000 usr/share/usb_modeswitch/19d2:bccd usr/share/usb_modeswitch/19d2:ffde @@ -216,6 +246,7 @@ usr/share/usb_modeswitch/1a8d:1000 usr/share/usb_modeswitch/1a8d:2000 usr/share/usb_modeswitch/1ab7:5700 usr/share/usb_modeswitch/1b7d:0700 +usr/share/usb_modeswitch/1bbb:000f usr/share/usb_modeswitch/1bbb:00ca usr/share/usb_modeswitch/1bbb:f000 usr/share/usb_modeswitch/1bbb:f017 @@ -226,6 +257,7 @@ usr/share/usb_modeswitch/1c9e:9200 usr/share/usb_modeswitch/1c9e:9800 usr/share/usb_modeswitch/1c9e:98ff usr/share/usb_modeswitch/1c9e:9e00 +usr/share/usb_modeswitch/1c9e:9e08 usr/share/usb_modeswitch/1c9e:f000 usr/share/usb_modeswitch/1da5:f000 usr/share/usb_modeswitch/1dd6:1000 @@ -237,16 +269,28 @@ usr/share/usb_modeswitch/1ee8:0009 usr/share/usb_modeswitch/1ee8:0013 usr/share/usb_modeswitch/1ee8:0040 usr/share/usb_modeswitch/1ee8:004a +usr/share/usb_modeswitch/1ee8:0054 usr/share/usb_modeswitch/1ee8:0060 +usr/share/usb_modeswitch/1ee8:0063 +usr/share/usb_modeswitch/1ee8:0068 usr/share/usb_modeswitch/1f28:0021 usr/share/usb_modeswitch/1fac:0032 usr/share/usb_modeswitch/1fac:0130 +usr/share/usb_modeswitch/1fac:0150 +usr/share/usb_modeswitch/1fac:0151 +usr/share/usb_modeswitch/2001:a706 +usr/share/usb_modeswitch/2001:a707 +usr/share/usb_modeswitch/2001:a708 +usr/share/usb_modeswitch/2001:a805 usr/share/usb_modeswitch/2001:a80b usr/share/usb_modeswitch/201e:1023 usr/share/usb_modeswitch/201e:2009 +usr/share/usb_modeswitch/2020:0002 usr/share/usb_modeswitch/2020:f00e +usr/share/usb_modeswitch/2077:1000 usr/share/usb_modeswitch/2077:f000 usr/share/usb_modeswitch/21f5:1000 +usr/share/usb_modeswitch/22de:6801 usr/share/usb_modeswitch/22de:6803 usr/share/usb_modeswitch/22f4:0021 usr/share/usb_modeswitch/230d:0001 diff --git a/config/rootfiles/core/71/filelists/GeoIP b/config/rootfiles/core/71/filelists/GeoIP new file mode 100644 index 000000000..0258236c0 --- /dev/null +++ b/config/rootfiles/core/71/filelists/GeoIP @@ -0,0 +1 @@ +usr/local/share/GeoIP/GeoIP.dat diff --git a/config/rootfiles/core/71/filelists/files b/config/rootfiles/core/71/filelists/files index 4201c3801..9dd0e30ed 100644 --- a/config/rootfiles/core/71/filelists/files +++ b/config/rootfiles/core/71/filelists/files @@ -3,6 +3,7 @@ etc/issue var/ipfire/general-functions.pl var/ipfire/header.pl var/ipfire/menu.d/10-system.menu +var/ipfire/menu.d/30-network.menu etc/rc.d/init.d/dnsmasq etc/rc.d/init.d/wlanclient etc/rc.d/init.d/networking/functions.network @@ -11,8 +12,13 @@ etc/rc.d/init.d/networking/red etc/rc.d/rc0.d/K82wlanclient etc/rc.d/rc3.d/S19wlanclient etc/rc.d/rc6.d/K82wlanclient +usr/local/bin/dnsmasqctrl usr/local/bin/wirelessclient +srv/web/ipfire/cgi-bin/dnsforward.cgi +srv/web/ipfire/cgi-bin/ids.cgi +srv/web/ipfire/cgi-bin/proxy.cgi srv/web/ipfire/cgi-bin/pppsetup.cgi srv/web/ipfire/cgi-bin/wirelessclient.cgi +var/ipfire/general-functions.pl var/ipfire/langs var/ipfire/backup/include diff --git a/config/rootfiles/core/71/filelists/hwdata b/config/rootfiles/core/71/filelists/hwdata new file mode 100644 index 000000000..5a9672ff3 --- /dev/null +++ b/config/rootfiles/core/71/filelists/hwdata @@ -0,0 +1,2 @@ +usr/share/hwdata/pci.ids +usr/share/hwdata/usb.ids diff --git a/config/rootfiles/core/71/filelists/oinkmaster b/config/rootfiles/core/71/filelists/oinkmaster new file mode 120000 index 000000000..75029e679 --- /dev/null +++ b/config/rootfiles/core/71/filelists/oinkmaster @@ -0,0 +1 @@ +../../../common/oinkmaster \ No newline at end of file diff --git a/config/rootfiles/core/71/filelists/snort b/config/rootfiles/core/71/filelists/snort new file mode 120000 index 000000000..9406ce01c --- /dev/null +++ b/config/rootfiles/core/71/filelists/snort @@ -0,0 +1 @@ +../../../common/snort \ No newline at end of file diff --git a/config/rootfiles/core/71/filelists/squid b/config/rootfiles/core/71/filelists/squid new file mode 120000 index 000000000..2dc8372a0 --- /dev/null +++ b/config/rootfiles/core/71/filelists/squid @@ -0,0 +1 @@ +../../../common/squid \ No newline at end of file diff --git a/config/rootfiles/core/71/filelists/usb_modeswitch b/config/rootfiles/core/71/filelists/usb_modeswitch new file mode 120000 index 000000000..acbab6f33 --- /dev/null +++ b/config/rootfiles/core/71/filelists/usb_modeswitch @@ -0,0 +1 @@ +../../../common/usb_modeswitch \ No newline at end of file diff --git a/config/rootfiles/core/71/filelists/usb_modeswitch_data b/config/rootfiles/core/71/filelists/usb_modeswitch_data new file mode 120000 index 000000000..4cbce46cf --- /dev/null +++ b/config/rootfiles/core/71/filelists/usb_modeswitch_data @@ -0,0 +1 @@ +../../../common/usb_modeswitch_data \ No newline at end of file diff --git a/config/rootfiles/core/71/update.sh b/config/rootfiles/core/71/update.sh index 5a5e1b1e5..8990b97ed 100644 --- a/config/rootfiles/core/71/update.sh +++ b/config/rootfiles/core/71/update.sh @@ -32,8 +32,17 @@ do rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire done +# +# Backup snort.conf +cp -f /etc/snort/snort.conf /etc/snort/snort.conf.backup + # #Stop services +/etc/init.d/snort stop + +# +#Remove old usb-modeswitch file +rm /usr/share/usb_modeswitch/0e8d:0002 # #Extract files @@ -44,8 +53,13 @@ extract_files touch /var/ipfire/ethernet/wireless chown nobody:nobody /var/ipfire/ethernet/wireless +# +# Import active rules to new snort.conf +grep "^include $RULE_PATH" /etc/snort/snort.conf.backup >> /etc/snort/snort.conf + # #Start services +/etc/init.d/snort start # #Update Language cache diff --git a/config/snort/snort.conf b/config/snort/snort.conf index ea9f81f3a..950ae3e55 100644 --- a/config/snort/snort.conf +++ b/config/snort/snort.conf @@ -3,7 +3,7 @@ # # some parts of this file are changed/updated by the webif ################################################### -# VERSIONS : 2.9.1.1 +# VERSIONS : 2.9.5.0 include /etc/snort/vars @@ -42,7 +42,7 @@ ipvar FTP_SERVERS $HOME_NET ipvar SIP_SERVERS $HOME_NET # List of ports you run web servers on -portvar HTTP_PORTS [80,81,311,444,591,593,901,1220,1414,1830,2301,2381,2809,3128,3702,5250,7001,7777,7779,8000,8008,8028,8080,8088,8118,8123,8180,8181,8243,8280,8888,9090,9091,9443,9999,11371,50002,55555] +portvar HTTP_PORTS [80,81,82,83,84,85,86,87,88,89,311,383,444,591,593,631,901,1220,1414,1741,1830,2301,2381,2809,3037,3057,3128,3702,4343,4848,5250,6080,6988,7000,7001,7144,7145,7510,7777,7779,8000,8008,8014,8028,8080,8085,8088,8090,8118,8123,8180,8181,8222,8243,8280,8300,8500,8800,8888,8899,9000,9060,9080,9090,9091,9443,9999,11371,34443,34444,41080,50002,55555] # List of ports you want to look for SHELLCODE on. portvar SHELLCODE_PORTS !80 @@ -75,6 +75,14 @@ var RULE_PATH /etc/snort/rules var SO_RULE_PATH /etc/snort/so_rules var PREPROC_RULE_PATH /etc/snort/preproc_rules +# If you are using reputation preprocessor set these +# Currently there is a bug with relative paths, they are relative to where snort is +# not relative to snort.conf like the above variables +# This is completely inconsistent with how other vars work, BUG 89986 +# Set the absolute path appropriately +var WHITE_LIST_PATH /etc/snort/rules +var BLACK_LIST_PATH /etc/snort/rules + ################################################### # Step #2: Configure the decoder. For more information, see README.decode @@ -161,7 +169,7 @@ config pcre_match_limit_recursion: 1500 config detection: search-method ac-split search-optimize max-pattern-len 20 # Configure the event queue. For more information, see README.event_queue -config event_queue: max_queue 8 log 3 order_events content_length +config event_queue: max_queue 8 log 5 order_events content_length ################################################### ## Configure GTP if it is to be used. @@ -215,6 +223,7 @@ dynamicengine /usr/lib/snort_dynamicengine/libsf_engine.so # path to dynamic rules libraries # dynamicdetection directory /usr/local/lib/snort_dynamicrules + ################################################### # Step #5: Configure preprocessors # For more information, see the Snort Manual, Configuring Snort - Preprocessors @@ -245,12 +254,12 @@ preprocessor stream5_global: track_tcp yes, \ min_response_seconds 5 preprocessor stream5_tcp: policy windows, detect_anomalies, require_3whs 180, \ overlap_limit 10, small_segments 3 bytes 150, timeout 180, \ - ports client 21 22 23 25 42 53 79 109 110 111 113 119 135 136 137 139 143 \ - 161 445 513 514 587 593 691 1433 1521 2100 3306 6070 6665 6666 6667 6668 6669 \ + ports client 21 22 23 25 42 53 70 79 109 110 111 113 119 135 136 137 139 143 \ + 161 222 445 513 514 587 593 691 1433 1521 1741 2100 3306 6070 6665 6666 6667 6668 6669 \ 7000 8181 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779, \ - ports both 80 81 311 443 465 563 591 593 636 901 989 992 993 994 995 1220 1414 1830 2301 2381 2809 3128 3702 5250 7907 7001 7802 7777 7779 \ + ports both 80 81 82 83 84 85 86 87 88 89 110 311 383 443 444 465 563 591 593 631 636 901 989 992 993 994 995 1220 1414 1830 2301 2381 2809 3037 3057 3128 3702 4343 4848 5250 6080 6988 7907 7000 7001 7144 7145 7510 7802 7777 7779 \ 7801 7900 7901 7902 7903 7904 7905 7906 7908 7909 7910 7911 7912 7913 7914 7915 7916 \ - 7917 7918 7919 7920 8000 8008 8028 8080 8088 8118 8123 8180 8243 8280 8888 9090 9091 9443 9999 11371 50002 55555 + 7917 7918 7919 7920 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180 8222 8243 8280 8300 8500 8800 8888 8899 9000 9060 9080 9090 9091 9443 9999 11371 34443 34444 41080 50002 55555 preprocessor stream5_udp: timeout 180 # performance statistics. For more information, see the Snort Manual, Configuring Snort - Preprocessors - Performance Monitor @@ -269,7 +278,7 @@ preprocessor http_inspect_server: server default \ max_headers 100 \ max_spaces 200 \ small_chunk_length { 10 5 } \ - ports { 80 81 311 591 593 901 1220 1414 1830 2301 2381 2809 3128 3702 5250 7001 7777 7779 8000 8008 8028 8080 8088 8118 8123 8180 8181 8243 8280 8888 9090 9091 9443 9999 11371 50002 55555 } \ + ports { 80 81 82 83 84 85 86 87 88 89 311 383 444 591 593 631 901 1220 1414 1741 1830 2301 2381 2809 3037 3057 3128 3702 4343 4848 5250 6080 6988 7000 7001 7144 7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180 8181 8222 8243 8280 8300 8500 8800 8888 8899 9000 9060 9080 9090 9091 9443 9999 11371 34443 34444 41080 50002 55555 } \ non_rfc_char { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 } \ enable_cookie \ extended_response_inspection \ @@ -286,7 +295,7 @@ preprocessor http_inspect_server: server default \ iis_delimiter no \ iis_unicode no \ multi_slash no \ - utf_8 no \ + utf_8 no \ u_encode yes \ webroot no @@ -384,7 +393,7 @@ preprocessor sfportscan: proto { all } memcap { 10000000 } sense_level { medium # preprocessor arpspoof_detect_host: 192.168.40.1 f0:0f:00:f0:0f:00 # SSH anomaly detection. For more information, see README.ssh -preprocessor ssh: server_ports { 22,222 } \ +preprocessor ssh: server_ports { 22 222 } \ autodetect \ max_client_bytes 19600 \ max_encrypted_packets 20 \ @@ -409,7 +418,7 @@ preprocessor ssl: ports { 443 444 465 563 636 989 992 993 994 995 7801 7802 7900 preprocessor sensitive_data: alert_threshold 25 # SIP Session Initiation Protocol preprocessor. For more information see README.sip -preprocessor sip: max_sessions 10000, \ +preprocessor sip: max_sessions 40000, \ ports { 5060 5061 5600 }, \ methods { invite \ cancel \ @@ -439,7 +448,7 @@ preprocessor sip: max_sessions 10000, \ max_to_len 256, \ max_via_len 1024, \ max_contact_len 512, \ - max_content_len 1024 + max_content_len 2048 # IMAP preprocessor. For more information see README.imap preprocessor imap: \ @@ -465,6 +474,15 @@ preprocessor dnp3: ports { 20000 } \ memcap 262144 \ check_crc +# Reputation preprocessor. For more information see README.reputation +#preprocessor reputation: \ +# memcap 500, \ +# priority whitelist, \ +# nested_ip inner, \ +# whitelist $WHITE_LIST_PATH/white_list.rules, \ +# blacklist $BLACK_LIST_PATH/black_list.rules + + ################################################### # Step #6: Configure output plugins # For more information, see Snort Manual, Configuring Snort - Output Modules diff --git a/config/squidclamav/squidclamav.conf b/config/squidclamav/squidclamav.conf index 19bffa060..2b8f5dc02 100644 --- a/config/squidclamav/squidclamav.conf +++ b/config/squidclamav/squidclamav.conf @@ -1,6 +1,5 @@ -#squid_ip 127.0.0.1 -#squid_port 3128 -proxy none +squid_ip 127.0.0.1 +squid_port 800 # logfile /var/log/squid/squidclamav.log redirect http://127.0.0.1:81/clwarn.cgi @@ -15,7 +14,7 @@ clamd_local /var/run/clamav/clamd maxsize 5000000 maxredir 30 timeout 60 -#trust_cache 1 +trust_cache 1 # # Do not scan standard HTTP images abort ^.*\.(ico|gif|png|jpg)$ @@ -37,4 +36,4 @@ abortcontent ^video\/x-flv$ abortcontent ^.*application\/x-mms-framed.*$ # # White list some sites -whitelist .*\.clamav.net \ No newline at end of file +whitelist .*\.clamav.net diff --git a/doc/language_issues.de b/doc/language_issues.de index 6c4a5d8b7..3b6e117ec 100644 --- a/doc/language_issues.de +++ b/doc/language_issues.de @@ -477,6 +477,8 @@ WARNING: translation string unused: year-graph WARNING: translation string unused: yearly firewallhits WARNING: untranslated string: Scan for Songs WARNING: untranslated string: bytes +WARNING: untranslated string: community rules +WARNING: untranslated string: emerging rules WARNING: untranslated string: new WARNING: untranslated string: outgoing firewall reserved groupname WARNING: untranslated string: qos add subclass @@ -484,4 +486,3 @@ WARNING: untranslated string: route config changed WARNING: untranslated string: routing config added WARNING: untranslated string: routing config changed WARNING: untranslated string: routing table -WARNING: untranslated string: wlanap country diff --git a/doc/language_issues.es b/doc/language_issues.es index 266361c35..2258d1b55 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -487,10 +487,7 @@ WARNING: translation string unused: use dov WARNING: translation string unused: use ibod WARNING: translation string unused: view log WARNING: translation string unused: vpn aggrmode -<<<<<<< HEAD WARNING: translation string unused: vpn incompatible use of defaultroute -======= ->>>>>>> 1b23ab3... Implement wireless client on RED. WARNING: translation string unused: vpn mtu invalid WARNING: translation string unused: vpn on blue WARNING: translation string unused: vpn on green @@ -552,6 +549,7 @@ WARNING: untranslated string: ccd routes WARNING: untranslated string: ccd subnet WARNING: untranslated string: ccd used WARNING: untranslated string: deprecated fs warn +WARNING: untranslated string: emerging rules WARNING: untranslated string: fireinfo ipfire version WARNING: untranslated string: fireinfo is disabled WARNING: untranslated string: fireinfo is enabled diff --git a/doc/language_issues.fr b/doc/language_issues.fr index f4f113154..58f44541a 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -549,6 +549,7 @@ WARNING: untranslated string: ccd subnet WARNING: untranslated string: ccd used WARNING: untranslated string: deprecated fs warn WARNING: untranslated string: dns address deleted txt +WARNING: untranslated string: emerging rules WARNING: untranslated string: fireinfo ipfire version WARNING: untranslated string: fireinfo is disabled WARNING: untranslated string: fireinfo is enabled diff --git a/doc/language_issues.nl b/doc/language_issues.nl index c6fa36f19..d7a7ff760 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -460,7 +460,6 @@ WARNING: translation string unused: transparent on WARNING: translation string unused: umount WARNING: translation string unused: umount removable media before to unplug WARNING: translation string unused: unencrypted -WARNING: translation string unused: unknown WARNING: translation string unused: update transcript WARNING: translation string unused: updates WARNING: translation string unused: updates is old1 @@ -522,3 +521,33 @@ WARNING: untranslated string: routing config added WARNING: untranslated string: routing config changed WARNING: untranslated string: routing table WARNING: untranslated string: uptime load average +WARNING: untranslated string: wlan client +WARNING: untranslated string: wlan client advanced settings +WARNING: untranslated string: wlan client and +WARNING: untranslated string: wlan client bssid +WARNING: untranslated string: wlan client ccmp +WARNING: untranslated string: wlan client configuration +WARNING: untranslated string: wlan client disconnected +WARNING: untranslated string: wlan client duplicate ssid +WARNING: untranslated string: wlan client edit entry +WARNING: untranslated string: wlan client encryption +WARNING: untranslated string: wlan client encryption none +WARNING: untranslated string: wlan client encryption wep +WARNING: untranslated string: wlan client encryption wpa +WARNING: untranslated string: wlan client encryption wpa2 +WARNING: untranslated string: wlan client group cipher +WARNING: untranslated string: wlan client group key algorithm +WARNING: untranslated string: wlan client invalid key length +WARNING: untranslated string: wlan client new entry +WARNING: untranslated string: wlan client new network +WARNING: untranslated string: wlan client pairwise cipher +WARNING: untranslated string: wlan client pairwise key algorithm +WARNING: untranslated string: wlan client pairwise key group key +WARNING: untranslated string: wlan client psk +WARNING: untranslated string: wlan client ssid +WARNING: untranslated string: wlan client tkip +WARNING: untranslated string: wlan client wpa mode +WARNING: untranslated string: wlan client wpa mode all +WARNING: untranslated string: wlan client wpa mode ccmp ccmp +WARNING: untranslated string: wlan client wpa mode ccmp tkip +WARNING: untranslated string: wlan client wpa mode tkip tkip diff --git a/doc/language_issues.pl b/doc/language_issues.pl index 266361c35..2258d1b55 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -487,10 +487,7 @@ WARNING: translation string unused: use dov WARNING: translation string unused: use ibod WARNING: translation string unused: view log WARNING: translation string unused: vpn aggrmode -<<<<<<< HEAD WARNING: translation string unused: vpn incompatible use of defaultroute -======= ->>>>>>> 1b23ab3... Implement wireless client on RED. WARNING: translation string unused: vpn mtu invalid WARNING: translation string unused: vpn on blue WARNING: translation string unused: vpn on green @@ -552,6 +549,7 @@ WARNING: untranslated string: ccd routes WARNING: untranslated string: ccd subnet WARNING: untranslated string: ccd used WARNING: untranslated string: deprecated fs warn +WARNING: untranslated string: emerging rules WARNING: untranslated string: fireinfo ipfire version WARNING: untranslated string: fireinfo is disabled WARNING: untranslated string: fireinfo is enabled diff --git a/doc/language_issues.ru b/doc/language_issues.ru index aa8e3edc5..7b8329523 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -480,10 +480,7 @@ WARNING: translation string unused: use dov WARNING: translation string unused: use ibod WARNING: translation string unused: view log WARNING: translation string unused: vpn aggrmode -<<<<<<< HEAD WARNING: translation string unused: vpn incompatible use of defaultroute -======= ->>>>>>> 1b23ab3... Implement wireless client on RED. WARNING: translation string unused: vpn mtu invalid WARNING: translation string unused: vpn on blue WARNING: translation string unused: vpn on green @@ -542,8 +539,10 @@ WARNING: untranslated string: ccd none WARNING: untranslated string: ccd routes WARNING: untranslated string: ccd subnet WARNING: untranslated string: ccd used +WARNING: untranslated string: community rules WARNING: untranslated string: deprecated fs warn WARNING: untranslated string: disk access per +WARNING: untranslated string: emerging rules WARNING: untranslated string: extrahd because there is already a device mounted WARNING: untranslated string: extrahd cant umount WARNING: untranslated string: extrahd install or load driver diff --git a/doc/language_issues.tr b/doc/language_issues.tr index d7a7d72ac..17568408d 100644 --- a/doc/language_issues.tr +++ b/doc/language_issues.tr @@ -460,7 +460,6 @@ WARNING: translation string unused: transparent on WARNING: translation string unused: umount WARNING: translation string unused: umount removable media before to unplug WARNING: translation string unused: unencrypted -WARNING: translation string unused: unknown WARNING: translation string unused: update transcript WARNING: translation string unused: updates WARNING: translation string unused: updates is old1 @@ -517,3 +516,33 @@ WARNING: untranslated string: route config changed WARNING: untranslated string: routing config added WARNING: untranslated string: routing config changed WARNING: untranslated string: routing table +WARNING: untranslated string: wlan client +WARNING: untranslated string: wlan client advanced settings +WARNING: untranslated string: wlan client and +WARNING: untranslated string: wlan client bssid +WARNING: untranslated string: wlan client ccmp +WARNING: untranslated string: wlan client configuration +WARNING: untranslated string: wlan client disconnected +WARNING: untranslated string: wlan client duplicate ssid +WARNING: untranslated string: wlan client edit entry +WARNING: untranslated string: wlan client encryption +WARNING: untranslated string: wlan client encryption none +WARNING: untranslated string: wlan client encryption wep +WARNING: untranslated string: wlan client encryption wpa +WARNING: untranslated string: wlan client encryption wpa2 +WARNING: untranslated string: wlan client group cipher +WARNING: untranslated string: wlan client group key algorithm +WARNING: untranslated string: wlan client invalid key length +WARNING: untranslated string: wlan client new entry +WARNING: untranslated string: wlan client new network +WARNING: untranslated string: wlan client pairwise cipher +WARNING: untranslated string: wlan client pairwise key algorithm +WARNING: untranslated string: wlan client pairwise key group key +WARNING: untranslated string: wlan client psk +WARNING: untranslated string: wlan client ssid +WARNING: untranslated string: wlan client tkip +WARNING: untranslated string: wlan client wpa mode +WARNING: untranslated string: wlan client wpa mode all +WARNING: untranslated string: wlan client wpa mode ccmp ccmp +WARNING: untranslated string: wlan client wpa mode ccmp tkip +WARNING: untranslated string: wlan client wpa mode tkip tkip diff --git a/html/cgi-bin/dnsforward.cgi b/html/cgi-bin/dnsforward.cgi new file mode 100644 index 000000000..15d430cf1 --- /dev/null +++ b/html/cgi-bin/dnsforward.cgi @@ -0,0 +1,359 @@ +#!/usr/bin/perl +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2013 IPFire Development Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +use strict; + +# enable only the following on debugging purpose +#use warnings; +#use CGI::Carp 'fatalsToBrowser'; + +require '/var/ipfire/general-functions.pl'; +require "${General::swroot}/lang.pl"; +require "${General::swroot}/header.pl"; + +#workaround to suppress a warning when a variable is used only once +my @dummy = ( ${Header::colouryellow} ); +undef (@dummy); + +my %cgiparams=(); +my %checked=(); +my %selected=(); +my $errormessage = ''; +my $filename = "${General::swroot}/dnsforward/config"; +my $changed = 'no'; + +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + +&Header::showhttpheaders(); + +$cgiparams{'ENABLED'} = 'off'; +$cgiparams{'ACTION'} = ''; +$cgiparams{'ZONE'} = ''; +$cgiparams{'FORWARD_SERVER'} = ''; +$cgiparams{'REMARK'} =''; +&Header::getcgihash(\%cgiparams); +open(FILE, $filename) or die 'Unable to open config file.'; +my @current = ; +close(FILE); + +### +# Add / Edit entries. +# +if ($cgiparams{'ACTION'} eq $Lang::tr{'add'}) +{ + # Check if the entered domainname is valid. + unless (&General::validdomainname($cgiparams{'ZONE'})) { + $errormessage = $Lang::tr{'invalid domain name'}; + } + + # Check if the settings for the forward server are valid. + unless(&General::validip($cgiparams{'FORWARD_SERVER'})) { + $errormessage = $Lang::tr{'invalid ip'}; + } + + # Go further if there was no error. + if ( ! $errormessage) + { + # Check if a remark has been entered. + $cgiparams{'REMARK'} = &Header::cleanhtml($cgiparams{'REMARK'}); + + # Check if we want to edit an existing or add a new entry. + if($cgiparams{'EDITING'} eq 'no') { + open(FILE,">>$filename") or die 'Unable to open config file.'; + flock FILE, 2; + print FILE "$cgiparams{'ENABLED'},$cgiparams{'ZONE'},$cgiparams{'FORWARD_SERVER'},$cgiparams{'REMARK'}\n"; + } else { + open(FILE, ">$filename") or die 'Unable to open config file.'; + flock FILE, 2; + my $id = 0; + foreach my $line (@current) + { + $id++; + if ($cgiparams{'EDITING'} eq $id) { + print FILE "$cgiparams{'ENABLED'},$cgiparams{'ZONE'},$cgiparams{'FORWARD_SERVER'},$cgiparams{'REMARK'}\n"; + } else { print FILE "$line"; } + } + } + close(FILE); + undef %cgiparams; + $changed = 'yes'; + } else { + # stay on edit mode if an error occur + if ($cgiparams{'EDITING'} ne 'no') + { + $cgiparams{'ACTION'} = $Lang::tr{'edit'}; + $cgiparams{'ID'} = $cgiparams{'EDITING'}; + } + } + # Restart dnsmasq. + system('/usr/local/bin/dnsmasqctrl restart >/dev/null'); +} + +### +# Remove existing entries. +# +if ($cgiparams{'ACTION'} eq $Lang::tr{'remove'}) +{ + my $id = 0; + open(FILE, ">$filename") or die 'Unable to open config file.'; + flock FILE, 2; + foreach my $line (@current) + { + $id++; + unless ($cgiparams{'ID'} eq $id) { print FILE "$line"; } + } + close(FILE); + # Restart dnsmasq. + system('/usr/local/bin/dnsmasqctrl restart >/dev/null'); +} + +### +# Toggle Enable/Disable for entries. +# +if ($cgiparams{'ACTION'} eq $Lang::tr{'toggle enable disable'}) +{ + open(FILE, ">$filename") or die 'Unable to open config file.'; + flock FILE, 2; + my $id = 0; + foreach my $line (@current) + { + $id++; + unless ($cgiparams{'ID'} eq $id) { print FILE "$line"; } + else + { + chomp($line); + my @temp = split(/\,/,$line); + print FILE "$cgiparams{'ENABLE'},$temp[1],$temp[2],$temp[3]\n"; + } + } + close(FILE); + # Restart dnsmasq. + system('/usr/local/bin/dnsmasqctrl restart >/dev/null'); +} + +### +# Read items for edit mode. +# +if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) +{ + my $id = 0; + foreach my $line (@current) + { + $id++; + if ($cgiparams{'ID'} eq $id) + { + chomp($line); + my @temp = split(/\,/,$line); + $cgiparams{'ENABLED'} = $temp[0]; + $cgiparams{'ZONE'} = $temp[1]; + $cgiparams{'FORWARD_SERVER'} = $temp[2]; + $cgiparams{'REMARK'} = $temp[3]; + } + } +} + +$checked{'ENABLED'}{'off'} = ''; +$checked{'ENABLED'}{'on'} = ''; +$checked{'ENABLED'}{$cgiparams{'ENABLED'}} = "checked='checked'"; + +&Header::openpage($Lang::tr{'dnsforward configuration'}, 1, ''); + +&Header::openbigbox('100%', 'left', '', $errormessage); + +### +# Error messages layout. +# +if ($errormessage) { + &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); + print "$errormessage\n"; + print " \n"; + &Header::closebox(); +} + +print "
\n"; + +my $buttontext = $Lang::tr{'add'}; +if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) { + &Header::openbox('100%', 'left', $Lang::tr{'dnsforward edit an entry'}); + $buttontext = $Lang::tr{'update'}; +} else { + &Header::openbox('100%', 'left', $Lang::tr{'dnsforward add a new entry'}); +} + +### +# Content of the main page. +# +print < + + $Lang::tr{'dnsforward zone'}: + + $Lang::tr{'enabled'} + + + + $Lang::tr{'dnsforward forward_server'}: + + + + + + + + + +
$Lang::tr{'remark'}: *
+ +
+ + + + + + +
* $Lang::tr{'this field may be blank'} + + +
+END +; +if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) { + print "\n"; +} else { + print "\n"; +} + +&Header::closebox(); +print "\n"; + +### +# Existing rules. +# +&Header::openbox('100%', 'left', $Lang::tr{'dnsforward entries'}); +print < + + $Lang::tr{'dnsforward zone'} + $Lang::tr{'dnsforward forward_server'} + $Lang::tr{'remark'} + $Lang::tr{'action'} + +END +; + +# If something has happened re-read config +if($cgiparams{'ACTION'} ne '' or $changed ne 'no') +{ + open(FILE, $filename) or die 'Unable to open config file.'; + @current = ; + close(FILE); +} + +### +# Re-read entries and highlight selected item for editing. +# +my $id = 0; +foreach my $line (@current) +{ + $id++; + chomp($line); + my @temp = split(/\,/,$line); + my $toggle = ''; + my $gif = ''; + my $gdesc = ''; + my $toggle = ''; + + if($cgiparams{'ACTION'} eq $Lang::tr{'edit'} && $cgiparams{'ID'} eq $id) { + print "\n"; } + elsif ($id % 2) { + print "\n"; } + else { + print "\n"; } + + if ($temp[0] eq 'on') { $gif='on.gif'; $toggle='off'; $gdesc=$Lang::tr{'click to disable'};} + else { $gif='off.gif'; $toggle='on'; $gdesc=$Lang::tr{'click to enable'}; } + +### +# Display edit page. +# +print <$temp[1] + $temp[2] + $temp[3] + +
+ + + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +END + ; +} +print "\n"; + +### +# Print the legend at the bottom if there are any configured entries. +# +# Check if the file size is zero - no existing entries. +if ( ! -z "$filename") { +print < + +   $Lang::tr{'legend'}: +   $Lang::tr{ + $Lang::tr{'click to disable'} +     $Lang::tr{ + $Lang::tr{'click to enable'} +     $Lang::tr{ + $Lang::tr{'edit'} +     $Lang::tr{ + $Lang::tr{'remove'} + + +END +; +} + +&Header::closebox(); + +&Header::closebigbox(); + +&Header::closepage(); diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 5c0bcffe3..62bb03a2b 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -263,9 +263,11 @@ if (-e "/etc/snort/snort.conf") { ####################### End added for snort rules control ################################# if ($snortsettings{'RULES'} eq 'subscripted') { - $url=" http://www.snort.org/sub-rules/snortrules-snapshot-2940.tar.gz/$snortsettings{'OINKCODE'}"; + $url=" http://www.snort.org/sub-rules/snortrules-snapshot-2950.tar.gz/$snortsettings{'OINKCODE'}"; } elsif ($snortsettings{'RULES'} eq 'registered') { - $url=" http://www.snort.org/reg-rules/snortrules-snapshot-2940.tar.gz/$snortsettings{'OINKCODE'}"; + $url=" http://www.snort.org/reg-rules/snortrules-snapshot-2950.tar.gz/$snortsettings{'OINKCODE'}"; +} elsif ($snortsettings{'RULES'} eq 'community') { + $url=" http://s3.amazonaws.com/snort-org/www/rules/community/community-rules.tar.gz"; } else { $url="http://rules.emergingthreats.net/open/snort-2.9.0/emerging.rules.tar.gz"; } @@ -274,8 +276,9 @@ if ($snortsettings{'ACTION'} eq $Lang::tr{'save'} && $snortsettings{'ACTION2'} e { $errormessage = $Lang::tr{'invalid input for oink code'} unless ( ($snortsettings{'OINKCODE'} =~ /^[a-z0-9]+$/) || - ($snortsettings{'RULESTYPE'} eq 'nothing' ) || - ($snortsettings{'RULESTYPE'} eq 'community' )); + ($snortsettings{'RULES'} eq 'nothing' ) || + ($snortsettings{'RULES'} eq 'emerging' ) || + ($snortsettings{'RULES'} eq 'community' )); &General::writehash("${General::swroot}/snort/settings", \%snortsettings); if ($snortsettings{'ENABLE_SNORT'} eq 'on') @@ -402,6 +405,7 @@ $checked{'ENABLE_GUARDIAN'}{'on'} = ''; $checked{'ENABLE_GUARDIAN'}{$snortsettings{'ENABLE_GUARDIAN'}} = "checked='checked'"; $selected{'RULES'}{'nothing'} = ''; $selected{'RULES'}{'community'} = ''; +$selected{'RULES'}{'emerging'} = ''; $selected{'RULES'}{'registered'} = ''; $selected{'RULES'}{'subscripted'} = ''; $selected{'RULES'}{$snortsettings{'RULES'}} = "selected='selected'"; @@ -515,6 +519,7 @@ print <