summaryrefslogtreecommitdiffstats
path: root/package/iptables/files/l7/ftp.pat
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-10-13 20:51:49 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-10-13 20:51:49 +0000
commitf52d66ff00b24111f87c274d3d7085ef2e1d27b1 (patch)
treed993cf48b4d89166701fe2f33976389d7634235d /package/iptables/files/l7/ftp.pat
parent725611a466f2edf12f809d22339b22223af4afe7 (diff)
parent0c0df9eb082d5ff83d0f22f6e00bf580729fb49d (diff)
finally move buildroot-ng to trunk
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5059 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iptables/files/l7/ftp.pat')
-rw-r--r--package/iptables/files/l7/ftp.pat34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/iptables/files/l7/ftp.pat b/package/iptables/files/l7/ftp.pat
new file mode 100644
index 000000000..9593ffd1b
--- /dev/null
+++ b/package/iptables/files/l7/ftp.pat
@@ -0,0 +1,34 @@
+# FTP - File Transfer Protocol - RFC 959
+# Pattern quality: great fast
+#
+# Usually runs on port 21. Note that the data stream is on a dynamically
+# assigned port, which means that you will need the FTP connection
+# tracking module in your kernel to usefully match FTP data transfers.
+#
+# This pattern is well tested. If it does not
+# work for you, or you believe it could be improved, please post to
+# l7-filter-developers@lists.sf.net . This list may be subscribed to at
+# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
+#
+# Matches the first two things a server should say. Most servers say
+# something after 220, even though they don't have to, and it usually
+# includes the string "ftp" (l7-filter is case insensitive).
+# This includes proftpd, vsftpd, wuftpd, warftpd, pureftpd, Bulletproof
+# FTP Server, and whatever ftp.microsoft.com uses. Just in case, the next
+# thing the server sends is a 331. All the above servers also send
+# something including "password" after this code.
+ftp
+# actually, let's just do the first for now, it's faster
+^220[\x09-\x0d -~]*ftp
+
+# This is ~10x faster if the stream starts with "220"
+#^220.*ftp
+
+# This will match more, but much slower
+#^220[\x09-\x0d -~]*ftp|331[\x09-\x0d -~]*password
+
+# This pattern is more precise, but takes longer to match. (3 packets vs. 1)
+#^220[\x09-\x0d -~]*\x0d\x0aUSER[\x09-\x0d -~]*\x0d\x0a331
+
+# same as above, but slightly less precise and only takes 2 packets.
+#^220[\x09-\x0d -~]*\x0d\x0aUSER[\x09-\x0d -~]*\x0d\x0a