Popular Post Dorik1972 Posted February 14, 2017 Popular Post Share Posted February 14, 2017 (edited) Насмотревшись логов своего Keenetic Ultra II и страдая легкой формой "паранойи", решил поделится своими фантазиями на тему использования iptables для усложнения жизни "сканерастов" (любителей утилиты nmap). 1) Создаем в /opt/etc/netfilter.d/ файлик , например, 001filter-rules.sh следующего содержания #!/bin/sh [ "$table" != "filter" ] && exit 0 ## Сбрасываем адреса изолированных сетей в публичной сети iptables -A INPUT -i _NDM_INPUT -s 192.168.0.0/16 -j DROP iptables -A INPUT -i _NDM_INPUT -s 10.0.0.0/8 -j DROP iptables -A INPUT -i _NDM_INPUT -s 172.16.0.0/12 -j DROP iptables -A INPUT -i _NDM_INPUT -s 240.0.0.0/5 -j DROP iptables -A INPUT -i _NDM_INPUT -s 127.0.0.0/8 -j DROP ## Запрещаем/разрешаем ICMP запросы: ## 0 — echo reply (echo-ответ, пинг) ## 3 — destination unreachable (адресат недосягаем) ## 4 — source quench (подавление источника, просьба посылать пакеты медленнее) ## 5 — redirect (редирект) ## 8 — echo request (echo-запрос, пинг) ## 9 — router advertisement (объявление маршрутизатора) ## 10 — router solicitation (ходатайство маршрутизатора) ## 11 — time-to-live exceeded (истечение срока жизни пакета) ## 12 — IP header bad (неправильный IPзаголовок пакета) ## 13 — timestamp request (запрос значения счетчика времени) ## 14 — timestamp reply (ответ на запрос значения счетчика времени) ## 15 — information request (запрос информации) ## 16 — information reply (ответ на запрос информации) ## 17 — address mask request (запрос маски сети) ## 18 — address mask reply (ответ на запрос маски сети) iptables -A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT iptables -A INPUT -p icmp -m icmp --icmp-type 8 -m limit --limit 1/second -j ACCEPT iptables -A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT iptables -A INPUT -p icmp -m icmp --icmp-type 12 -j ACCEPT iptables -A OUTPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT iptables -A OUTPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT iptables -A OUTPUT -p icmp -m icmp --icmp-type 4 -j ACCEPT iptables -A OUTPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT iptables -A OUTPUT -p icmp -m icmp --icmp-type 12 -j ACCEPT ## Защищаемся от SMURF-аттак iptables -A INPUT -p icmp -m icmp --icmp-type 17 -j DROP iptables -A INPUT -p icmp -m icmp --icmp-type 13 -j DROP ## Блокируем новые пакеты, которые не имеют флага SYN iptables -A INPUT -i _NDM_INPUT -p tcp ! --syn -m conntrack --ctstate NEW -j DROP ## Блокируем фрагментированные пакеты iptables -A INPUT -i _NDM_INPUT -f -j DROP ## Блокируем пакеты с неверными TCP флагами iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags FIN,SYN FIN,SYN -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags FIN,RST FIN,RST -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags FIN,ACK FIN -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags ACK,URG URG -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags ACK,FIN FIN -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags ACK,PSH PSH -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags ALL ALL -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags ALL NONE -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags ALL FIN,PSH,URG -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags ALL SYN,FIN,PSH,URG -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j DROP ##FINGERPRINTING для самоуспокоения iptables -A INPUT -i _NDM_INPUT -p tcp --dport 0 -j DROP iptables -A INPUT -i _NDM_INPUT -p udp --dport 0 -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --sport 0 -j DROP iptables -A INPUT -i _NDM_INPUT -p udp --sport 0 -j DROP 2) даем права 755 для /opt/etc/netfilter.d/001filter-rules.sh chmod 755 /opt/etc/netfilter.d/001filter-rules.sh 3) Перегружаем "зверька" ..... 4) Спим более-менее спокойно ... но... помним , что "враг" не дремлет p.s. Please Ногами не пинать. Критику приемлю. Добавки в "рецепт" приветствуются p.s.s. Полезные ресурсы по теме - http://explainshell.com/explain?cmd=iptables+-A+INPUT+-m+state+--state+!+ESTABLISHED%2CRELATED+-j+ACCEPT + https://www.opennet.ru/docs/RUS/iptables/#TRAVERSINGOFTABLES Edited February 16, 2017 by Dorik1972 10 Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted February 14, 2017 Author Share Posted February 14, 2017 (edited) Ах да ... еще можно сделать вот такую "гадость" , как добавку к выше опубликованному ... тут каждый решает сам для себя и правит правила "под себя" .... Пример : ## Любой пакет идущий на не 80 или 8080 порт блокируется с ip адресом, отправившим его, на 120 секунд, ## тем самым предотвращается сканирование портов iptables -A INPUT -i _NDM_INPUT -m recent --rcheck --seconds 120 --name FUCKOFF -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp -m multiport ! --dports 8080,80 -m recent --set --name FUCKOFF -j DROP iptables -A INPUT -i _NDM_INPUT -p tcp --syn --dport 8080 -j ACCEPT iptables -A INPUT -i _NDM_INPUT -p tcp --syn --dport 80 -j ACCEPT Но тут надо ВНИМАТЕЛЬНО ... ибо если если у Вас открыты какие-то порты кроме 80 или 8080 то надо "ПРАВИТЬ ПОД СЕБЯ" ! p.s. И не забываем о чудной функции UPnP ... которая позволяет создавать разрешающие правила по "требованию" .... чтоб часом не залочить Edited February 14, 2017 by Dorik1972 5 Quote Link to comment Share on other sites More sharing options...
Александр Рыжов Posted February 15, 2017 Share Posted February 15, 2017 14 часа назад, Dorik1972 сказал: Насмотревшись логов своего Keenetic Ultra II и страдая легкой формой "паранойи", решил поделится своими фантазиями на тему использования iptables для усложнения жизни "сканерастов" (любителей утилиты nmap). Для любителей посканировать я в своё время добавил в репозиторий portspoof. Кстати, при желании софтину можно настроить так, чтобы владельцам nmap'а отправлялся exploit:) 2 1 Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted February 15, 2017 Author Share Posted February 15, 2017 1 час назад, Александр Рыжов сказал: Для любителей посканировать я в своё время добавил в репозиторий portspoof. Кстати, при желании софтину можно настроить так, чтобы владельцам nmap'а отправлялся exploit:) "Поковыряю" ... мерси за "наводку" ... может тут выложу варианты настройки .... но думаю одно другому точно не мешает 1 Quote Link to comment Share on other sites More sharing options...
Sovenok Posted February 15, 2017 Share Posted February 15, 2017 а зачем? Quote Link to comment Share on other sites More sharing options...
stalin Posted February 15, 2017 Share Posted February 15, 2017 Подскажите что означает данная ошибка Feb 15 21:57:52ndmOpkg::Manager: /opt/etc/ndm/netfilter.d/001filter-rules.sh: Try `iptables -h' or 'iptables --help' for more information iptables установлен Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted February 15, 2017 Author Share Posted February 15, 2017 38 минут назад, stalin сказал: Подскажите что означает данная ошибка Feb 15 21:57:52ndmOpkg::Manager: /opt/etc/ndm/netfilter.d/001filter-rules.sh: Try `iptables -h' or 'iptables --help' for more information iptables установлен Означает что какое-то из правил в Вашем скрипте некорректно .... Quote Link to comment Share on other sites More sharing options...
stalin Posted February 15, 2017 Share Posted February 15, 2017 (edited) 2 часа назад, Dorik1972 сказал: Означает что какое-то из правил в Вашем скрипте некорректно .... Разобрался это все из за windows кодировки было а нужна была dos2unix и в вашем скрипте тоже ошибка присутствует в самом начале Edited February 15, 2017 by stalin Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted February 16, 2017 Author Share Posted February 16, 2017 7 часов назад, stalin сказал: Разобрался это все из за windows кодировки было а нужна была dos2unix и в вашем скрипте тоже ошибка присутствует в самом начале # добавил ..... 1 Quote Link to comment Share on other sites More sharing options...
Сергей Губа Posted February 17, 2017 Share Posted February 17, 2017 (edited) Добрый день! Тема "улыбнула". Feb 17 13:31:55ndmOpkg::Manager: /opt/etc/ndm/netfilter.d/001-filter-rules.sh: iptables: Invalid argument. Run `dmesg' for more information. Подскажите, где "собака порылась"...копипаст не прокатил... Спасибо! Edited February 17, 2017 by Сергей Губа Quote Link to comment Share on other sites More sharing options...
Сергей Губа Posted February 17, 2017 Share Posted February 17, 2017 root@Keenetic_GigaII:/opt/etc/ndm/netfilter.d$ dmesg Скрытый текст Linux version 3.4.113 (developers@ndmsystems.com) (gcc version 5.4.0 (crosstool-NG crosstool-ng-1.22.0-ndm-14 - NDMS Toolkit 1.0.0) ) #1 SMP Sat Feb 11 02:14:04 MSK 2017 ISPRAM0: PA=002d8000,Size=00008000,enabled Ralink RT6856 SoC: RAM: DDR2 256MB CPU/SYS frequency: 700/233 MHz CPU revision is: 00019555 (MIPS 34Kc) Determined physical RAM map: memory: 10000000 @ 00000000 (usable) Zone PFN ranges: Normal 0x00000000 -> 0x00010000 Movable zone start PFN for each node Early memory PFN ranges 0: 0x00000000 -> 0x00010000 On node 0 totalpages: 65536 free_area_init_node: node 0, pgdat 80366fc0, node_mem_map 81000000 Normal zone: 512 pages used for memmap Normal zone: 0 pages reserved Normal zone: 65024 pages, LIFO batch:15 Detected 1 available secondary CPU(s) Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes PERCPU: Embedded 7 pages/cpu @81203000 s5952 r8192 d14528 u32768 pcpu-alloc: s5952 r8192 d14528 u32768 alloc=8*4096 pcpu-alloc: [0] 0 [0] 1 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024 Kernel command line: console=ttyS0,57600n8 rdinit=/sbin/init es=1 PID hash table entries: 1024 (order: 0, 4096 bytes) Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Writing ErrCtl register=00073260 Readback ErrCtl register=00073260 Memory: 256016k/262144k available (2816k kernel code, 6128k reserved, 541k data, 224k init, 0k highmem) Hierarchical RCU implementation. NR_IRQS:41 console [ttyS0] enabled Calibrating delay loop... 464.38 BogoMIPS (lpj=928768) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 Config7: 0x80080500 ISPRAM0: PA=002d8000,Size=00008000,enabled Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes CPU revision is: 00019555 (MIPS 34Kc) Synchronize counters for CPU 1: done. Brought up 2 CPUs NET: Registered protocol family 16 bio: create slab <bio-0> at 0 PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff] pci_bus 0000:00: root bus resource [io 0x1f600000-0x1f60ffff] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400 pci 0000:00:00.0: supports D1 pci 0000:00:00.0: PME# supported from D0 D1 D3hot pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring pci 0000:01:00.0: [1814:3091] type 00 class 0x028000 pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000ffff] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x2000ffff] pci 0000:00:00.0: PCI bridge to [bus 01-01] pci 0000:00:00.0: bridge window [mem 0x20000000-0x200fffff] PCI: Enabling device 0000:00:00.0 (0000 -> 0002) Switching to clocksource MIPS NET: Registered protocol family 2 IP route cache hash table entries: 2048 (order: 1, 8192 bytes) TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 4, 65536 bytes) TCP: Hash tables configured (established 8192 bind 8192) TCP: reno registered UDP hash table entries: 128 (order: 0, 4096 bytes) NET: Registered protocol family 1 PCI: CLS 32 bytes, default 32 squashfs: version 4.0 (2009/01/31) Phillip Lougher msgmni has been set to 500 io scheduler noop registered (default) ttyS0 at I/O 0xbfbf0003 (irq = 1) is a TC3162 Registering NDM partitions parser MediaTek BBU SPI flash driver, SPI clock: 29MHz SPI flash chip: MX25L12835F (c2 2018c220) (16384 Kbytes) 10 ndmpart partitions found on MTD device raspi Creating 10 MTD partitions on "raspi": 0x000000000000-0x000000030000: "U-Boot" 0x000000030000-0x000000040000: "U-Config" 0x000000040000-0x000000050000: "RF-EEPROM" 0x000000050000-0x0000001a0000: "Kernel" 0x0000001a0000-0x000000ef0000: "RootFS" mtd: device 4 (RootFS) set to be root filesystem 0x000000050000-0x000000ef0000: "Firmware" 0x000000ef0000-0x000000f00000: "Config" 0x000000f00000-0x000000ff0000: "Storage" 0x000000ff0000-0x000001000000: "Dump" 0x000000000000-0x000001000000: "Full" tun: Universal TUN/TAP device driver, 1.6 tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> PPP generic driver version 2.4.2 PPP MPPE Compression module registered NET: Registered protocol family 24 PPTP driver version 0.8.5 nf_conntrack version 0.5.0 (32768 buckets, 32768 max) xt_time: kernel timezone is -0000 Bridge firewalling registered ubridge: Tiny bridge driver, 1.1 IPv4 over IPv4 tunneling driver gre: GRE over IPv4 demultiplexor driver Fast NAT loaded ip_tables: (C) 2000-2006 Netfilter Core Team TCP: cubic registered NET: Registered protocol family 10 ip6_tables: (C) 2000-2006 Netfilter Core Team IPv6 over IPv4 tunneling driver NET: Registered protocol family 17 8021q: 802.1Q VLAN Support v1.8 VFS: Mounted root (squashfs filesystem) readonly on device 31:4. Freeing unused kernel memory: 224k freed Mirror/redirect action on Ebtables v2.0 registered fuse init (API version 7.18) arp_tables: (C) 2002 David S. Miller Netfilter messages via NETLINK v0.30. SCSI subsystem initialized loop: module loaded ip_gre: GRE over IPv4 tunneling driver NET: Registered protocol family 15 usbip_core: module is from the staging directory, the quality is unknown, you have been warned. usbip_core: USB/IP Core v1.0.0 nf_conntrack_rtsp v0.7 loading phr: module license 'Proprietary' taints kernel. phr: I/O peripheral driver. (C) 2013-2016, NDM Systems Inc., v2.0.7 PCI: Enabling device 0000:01:00.0 (0000 -> 0002) phr: "kng_rb" platform driver loaded Initializing XFRM netlink socket L2TP kernel driver, v1.6 RPC: Registered named UNIX socket transport module. RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. EoIP (IPv4) tunneling driver v1.0-1 TC3262 WDG Timer Module Failed to load ipt action u32 classifier Actions configured NF_TPROXY: Transparent proxy support initialized, version 4.1.0 NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd. nacct: init, v 0.3 mtdoops_proc: Attached to MTD device 8 resetnds: Module loaded. usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb usbcore: registered new interface driver usbserial usbserial: USB Serial Driver core vhci_hcd: module is from the staging directory, the quality is unknown, you have been warned. vhci_hcd vhci_hcd: USB/IP Virtual Host Controller vhci_hcd vhci_hcd: new USB bus registered, assigned bus number 1 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 usb usb1: Product: USB/IP Virtual Host Controller usb usb1: Manufacturer: Linux 3.4.113 vhci_hcd usb usb1: SerialNumber: vhci_hcd hub 1-0:1.0: USB hub found hub 1-0:1.0: 8 ports detected vhci_hcd: USB/IP 'Virtual' Host Controller (VHCI) Driver v1.0.0 ctnetlink v0.93: registering with nfnetlink. ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci-platform ehci-platform: Generic Platform EHCI Controller ehci-platform ehci-platform: new USB bus registered, assigned bus number 2 ehci-platform ehci-platform: irq 18, io mem 0x1fbb0000 ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00, overcurrent ignored usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 usb usb2: Product: Generic Platform EHCI Controller usb usb2: Manufacturer: Linux 3.4.113 ehci_hcd usb usb2: SerialNumber: ehci-platform hub 2-0:1.0: USB hub found hub 2-0:1.0: 2 ports detected usbcore: registered new interface driver cdc_wdm jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. Tuxera NTFS driver 3016.10.24.1d [Flags: R/W MODULE]. Built against headers 3.4.113 SMP mips Running on kernel 3.4.113 #1 SMP Sat Feb 11 02:14:04 MSK 2017 mips Linux video capture interface: v2.00 Tuxera FAT 12/16/32 driver version 3015.1.29 [Flags: R/W MODULE]. Built against headers 3.4.113 SMP mips Running on kernel 3.4.113 #1 SMP Sat Feb 11 02:14:04 MSK 2017 mips usbcore: registered new interface driver sierra USB Serial support registered for Sierra USB modem usbcore: registered new interface driver huawei_ether ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver ohci-platform ohci-platform: Generic Platform OHCI Controller ohci-platform ohci-platform: new USB bus registered, assigned bus number 3 ohci-platform ohci-platform: irq 18, io mem 0x1fba0000 usb usb3: New USB device found, idVendor=1d6b, idProduct=0001 usb usb3: Product: Generic Platform OHCI Controller usb usb3: Manufacturer: Linux 3.4.113 ohci_hcd usb usb3: SerialNumber: ohci-platform hub 3-0:1.0: USB hub found hub 3-0:1.0: 2 ports detected usbcore: registered new interface driver dm9601 usbcore: registered new interface driver usblp usbcore: registered new interface driver cdc_acm cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. nf_nat_rtsp v0.7 loading Tuxera HFS+ driver 3016.7.4 Installing knfsd (copyright (C) 1996 okir@monad.swb.de). usbcore: registered new interface driver kalmia ip_set: protocol 6 usbip_host: module is from the staging directory, the quality is unknown, you have been warned. usbcore: registered new interface driver usbip-host usbip_host: USB/IP Host Driver v1.0.0 i2c /dev entries driver USB extras loaded usbcore: registered new interface driver cdc_ncm uvcvideo: Unable to create debugfs directory usbcore: registered new interface driver uvcvideo USB Video Class driver (1.1.1) usbcore: registered new interface driver option USB Serial support registered for GSM modem (1-port) usbcore: registered new interface driver asix usbcore: registered new interface driver huawei_cdc_ncm usbcore: registered new interface driver cdc_ether usbcore: registered new interface driver snd-usb-audio usbcore: registered new interface driver rndis_host rtsoc_eth: Ethernet switch driver for Ralink SoCs rtsoc_eth: (C) 2016, NDM Systems Inc., v1.1.38 rtsoc_eth: RT6856 SoC, TX/RX buffers: 512/1024, poll budget 32 rtsoc_eth: ec:43:f6:08:15:84 address assigned to eth2 rtsoc_eth: RTL8367B switch configured with 2ns. RGMII delay rtsoc_eth: RTL8367B switch initialized ntc: NDM traffic control module v2.1.3 device eth2 entered promiscuous mode device eth2.1 entered promiscuous mode br0: port 1(eth2.1) entered forwarding state br0: port 1(eth2.1) entered forwarding state br0: port 1(eth2.1) entered disabled state br0: port 1(eth2.1) entered forwarding state br0: port 1(eth2.1) entered forwarding state device ra0 entered promiscuous mode br0: port 2(ra0) entered forwarding state br0: port 2(ra0) entered forwarding state br0: port 2(ra0) entered disabled state br0: port 1(eth2.1) entered disabled state br0: port 2(ra0) entered forwarding state br0: port 2(ra0) entered forwarding state br0: port 1(eth2.1) entered forwarding state br0: port 1(eth2.1) entered forwarding state br0: port 2(ra0) entered forwarding state br0: port 1(eth2.1) entered forwarding state device eth2.3 entered promiscuous mode br1: port 1(eth2.3) entered forwarding state br1: port 1(eth2.3) entered forwarding state br1: port 1(eth2.3) entered disabled state br1: port 1(eth2.3) entered forwarding state br1: port 1(eth2.3) entered forwarding state device ra1 entered promiscuous mode br1: port 2(ra1) entered forwarding state br1: port 2(ra1) entered forwarding state br1: port 2(ra1) entered disabled state br1: port 1(eth2.3) entered disabled state br1: port 2(ra1) entered forwarding state br1: port 2(ra1) entered forwarding state br1: port 1(eth2.3) entered forwarding state br1: port 1(eth2.3) entered forwarding state br1: port 2(ra1) entered forwarding state br1: port 1(eth2.3) entered forwarding state AP 2.4GHz: run channel auto-switch igmpsn: IGMP switch snooping module (C) 2015, 2016 NDM Systems Inc., v4.0.34 usb 2-1: new high-speed USB device number 2 using ehci-platform usb 2-1: New USB device found, idVendor=090c, idProduct=1000 usb 2-1: Product: Silicon-Power usb 2-1: Manufacturer: UFD 2.0 usb 2-1: SerialNumber: 1106040900000824 scsi0 : usb-storage 2-1:1.0 br0: port 2(ra0) entered disabled state br1: port 2(ra1) entered disabled state usb 3-2: new full-speed USB device number 2 using ohci-platform br1: port 2(ra1) entered forwarding state br1: port 2(ra1) entered forwarding state br0: port 2(ra0) entered forwarding state br0: port 2(ra0) entered forwarding state Ralink HW NAT 5.0.2.0-tc-5 Module Enabled, FoE Size: 16384 usb 3-2: New USB device found, idVendor=1b3f, idProduct=2008 usb 3-2: Product: USB Audio Device usb 3-2: Manufacturer: GeneralPlus usbip-host 3-2:1.0: 3-2 is not in match_busid table... skip! SWNAT sizeof(bind) = 196 SWNAT sizeof(hashent) = 56 SWNAT is registered SWNAT enabled SWNAT caps: L2TP, PPTP, PPPoE, IPoE, MC, USB CDC/DSL Fast VPN init, v4.0-91 PPPoE/IPoE LAN software acceleration is disabled usbip-host 3-2:1.3: 3-2 is not in match_busid table... skip! br1: port 2(ra1) entered forwarding state br0: port 2(ra0) entered forwarding state EIP93: Started (v 4.3.0.0-20) scsi 0:0:0:0: Direct-Access UFD 2.0 Silicon-Power16G 1100 PQ: 0 ANSI: 0 CCS sd 0:0:0:0: Attached scsi generic sg0 type 0 sd 0:0:0:0: [sda] 31506432 512-byte logical blocks: (16.1 GB/15.0 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00 sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sda2 sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] Attached SCSI removable disk EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) EXT4-fs (sda1): re-mounted. Opts: (null) Adding 2096124k swap on /tmp/mnt/SP-16Gb/swapfile. Priority:-1 extents:24 across:2239168k AP 2.4GHz: run channel auto-switch EXT4-fs (sda1): error count since last fsck: 10 EXT4-fs (sda1): initial error at time 1484029214: ext4_readdir:213: inode 11 EXT4-fs (sda1): last error at time 1486387265: ext4_readdir:213: inode 11 Quote Link to comment Share on other sites More sharing options...
Сергей Губа Posted February 17, 2017 Share Posted February 17, 2017 Убрал "гадость" и получил: ndmOpkg::Manager: /opt/etc/ndm/netfilter.d/001-filter-rules.sh: iptables: Resource temporarily unavailable. Что-то не так? Где могут быть "грабли"? Quote Link to comment Share on other sites More sharing options...
vasek00 Posted February 17, 2017 Share Posted February 17, 2017 В 15.02.2017 в 00:35, Dorik1972 сказал: Насмотревшись логов своего Keenetic Ultra II и страдая легкой формой "паранойи", решил поделится своими фантазиями на тему использования iptables для усложнения жизни "сканерастов" (любителей утилиты nmap). Можно узнать процент попадания в созданные правила - чего либо. Например про ICMP я бы обратил внимание например на две переменные "icmp_ratelimit" (по значению не более 1000*0.01=10) и "icmp_ratemask" (по значению 6168 ограничения на ICMP: Destination Unreachable=3, ICMP Source Quench=4, ICMP Time Exceeded=11, ICMP Parameter Problem12 или равно 2^3+2^4+2^11+2^12); "icmp_echo_ignore_broadcasts" равна 1 (т.е. включено или проще говоря защита от smurf атак) Это я к чему - кое над чем уже подумали до нас. Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted February 17, 2017 Author Share Posted February 17, 2017 6 часов назад, vasek00 сказал: Можно узнать процент попадания в созданные правила - чего либо. Например про ICMP я бы обратил внимание например на две переменные "icmp_ratelimit" (по значению не более 1000*0.01=10) и "icmp_ratemask" (по значению 6168 ограничения на ICMP: Destination Unreachable=3, ICMP Source Quench=4, ICMP Time Exceeded=11, ICMP Parameter Problem12 или равно 2^3+2^4+2^11+2^12); "icmp_echo_ignore_broadcasts" равна 1 (т.е. включено или проще говоря защита от smurf атак) Это я к чему - кое над чем уже подумали до нас. Ну однозначно не отрицаю что "за нас уже подумали" ...... А процент попадания можно и самому "подразвлечься". Для примера ... переносим вебмордочку зверька например на 8080. 80 - пробрасываем куда-нить на локалочку и там аккуратненько логгируем все попытки ... с приведенными правилами и без них (сутки двое) ... потом сравниваем.... Количество "ломящихся" с CN, US и RU будет более чем достаточно для "чистоты" эксперимента и сопоставления. Quote Link to comment Share on other sites More sharing options...
vasek00 Posted February 17, 2017 Share Posted February 17, 2017 40 минут назад, Dorik1972 сказал: Ну однозначно не отрицаю что "за нас уже подумали" ...... Тогда зачем ## Блокируем фрагментированные пакеты iptables -A INPUT -i _NDM_INPUT -f -j DROP Продолжим изыскание переменные: ipfrag_high_thresh = 256Кб очередь фрагмент.пакетов , ipfrag_low_thresh = 192Кб нижний порог, ipfrag_time = 30 сек. Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted February 17, 2017 Author Share Posted February 17, 2017 (edited) 45 минут назад, vasek00 сказал: Тогда зачем ## Блокируем фрагментированные пакеты iptables -A INPUT -i _NDM_INPUT -f -j DROP Продолжим изыскание переменные: ipfrag_high_thresh = 256Кб очередь фрагмент.пакетов , ipfrag_low_thresh = 192Кб нижний порог, ipfrag_time = 30 сек. Подозреваю что Вами тщательно "проштудирована" матчасть , а именно @Linux advanced routing & Traffic Control ... Особенно в части расчетов ratemask . Я же написал "во первых строках письма" что приемлю любую конструктивную критику и "добавки" в рецепт. Поправьте или внесите аргументированные изменения в предложенную схему. Думаю все будут только благодарны. p.s. А по поводу предыдущего сообщения с расчетом ratemask = 2^3+2^4+2^11+2^12, то да по умолчанию в /proc/sys/net/ipv4 значение 6168 (001100000011000) что, таки да, соответствует наложению ограничений на ICMP == 3, 4, 11 и 12 и icmp_ratelimit = 1000 , что означает что максимальная частота генерации ICMP пакетов с типом , указанных в icmp_ratemask , не чаще 1 посылки в 10сек ... Я верно интерпретирую ? Edited February 17, 2017 by Dorik1972 Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted February 17, 2017 Author Share Posted February 17, 2017 (edited) Понимаю что приведенный ниже лог никакого отношения к nmap-ерам не имеет отношения ... но тем не менее вот таких "красавчиков" + nmap-еров пруд пруди..... эх ну не хватает еще xtables-addon чтоб "давить гнид" и "завешивать" им запрсы минут на 20-30 .... И этот "черносливчик" туда же ... вслед за специалистами из CN и US .... { "ip": "41.142.242.99", "country_code": "MA", "country": "Morocco", "country_rus": "Марокко", "region": "Tanger-tetouan", "region_rus": "Танжер-Тетуан", "city": "Derdara", "latitude": "35.11041", "longitude": "-5.29015", "zip_code": "91042", "time_zone": "+00:00" } 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/dbadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/sqlmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/mysqlmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyadmin2/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyadmin3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyadmin4/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/2phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmy/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phppma/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/shopdb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/MyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/program/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/PMA/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/dbadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/pma/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/database/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sqlmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysqlmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/php-myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmy-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysqladmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/sysadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/sqladmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/db/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/web/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/pMA/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/pma/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/db/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/web/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/pMA/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/php-myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpmy-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/sql/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/webadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/sqlweb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/websql/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/webdb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/sqladmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/sql-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpmyadmin2/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpMyAdmin2/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/webadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/dbweb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/websql/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/webdb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/dbadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/db-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpmyadmin3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpMyAdmin3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpMyAdmin-3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/db/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/web/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/pma/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/PMA/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin2/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin4/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin-3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/php-my-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/PMA2012/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/pma2012/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/PMA2011/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/pma2011/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" Edited February 17, 2017 by Dorik1972 Quote Link to comment Share on other sites More sharing options...
vasek00 Posted February 18, 2017 Share Posted February 18, 2017 14 часа назад, Dorik1972 сказал: Подозреваю что Вами тщательно "проштудирована" матчасть , а именно @Linux advanced routing & Traffic Control ... Особенно в части расчетов ratemask . Я же написал "во первых строках письма" что приемлю любую конструктивную критику и "добавки" в рецепт. Поправьте или внесите аргументированные изменения в предложенную схему. Думаю все будут только благодарны. p.s. А по поводу предыдущего сообщения с расчетом ratemask = 2^3+2^4+2^11+2^12, то да по умолчанию в /proc/sys/net/ipv4 значение 6168 (001100000011000) что, таки да, соответствует наложению ограничений на ICMP == 3, 4, 11 и 12 и icmp_ratelimit = 1000 , что означает что максимальная частота генерации ICMP пакетов с типом , указанных в icmp_ratemask , не чаще 1 посылки в 10сек ... Я верно интерпретирую ? О какой критики может идти речь, спс за "@Linux advanced routing & Traffic Control....". В данном случае на то он и форум для обсуждения тех или иных вопрос Вопрос только в необходимости данных правил. Повторюсь - многое уже придумано и людьми которые понимают в этом побольше нас с вами, но меня уж точно. ДА. Quote Link to comment Share on other sites More sharing options...
Le ecureuil Posted February 18, 2017 Share Posted February 18, 2017 14 часа назад, Dorik1972 сказал: Понимаю что приведенный ниже лог никакого отношения к nmap-ерам не имеет отношения ... но тем не менее вот таких "красавчиков" + nmap-еров пруд пруди..... эх ну не хватает еще xtables-addon чтоб "давить гнид" и "завешивать" им запрсы минут на 20-30 .... И этот "черносливчик" туда же ... вслед за специалистами из CN и US .... { "ip": "41.142.242.99", "country_code": "MA", "country": "Morocco", "country_rus": "Марокко", "region": "Tanger-tetouan", "region_rus": "Танжер-Тетуан", "city": "Derdara", "latitude": "35.11041", "longitude": "-5.29015", "zip_code": "91042", "time_zone": "+00:00" } 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/dbadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/sqlmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/mysqlmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:32 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyadmin2/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyadmin3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:33 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmyadmin4/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/2phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmy/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phppma/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:34 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/shopdb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/MyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/program/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/PMA/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/dbadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:35 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/pma/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/database/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:36 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sqlmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysqlmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/php-myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmy-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:37 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysqladmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/sysadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:38 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/sqladmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/db/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/web/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/admin/pMA/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/pma/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/db/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:39 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/web/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/mysql/pMA/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/php-myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpmy-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:40 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/sql/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/webadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/sqlweb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/websql/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/webdb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:41 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/sqladmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/sql-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpmyadmin2/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpMyAdmin2/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/sql/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:42 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/myadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/webadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/dbweb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/websql/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/webdb/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:43 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/dbadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/db-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpmyadmin3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpMyAdmin3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/db/phpMyAdmin-3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/phpmyadmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:44 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/phpMyAdmin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/db/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/web/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/pma/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/PMA/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:45 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/administrator/admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin2/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin4/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpMyAdmin-3/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:46 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/php-my-admin/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/PMA2012/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/pma2012/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/PMA2011/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/pma2011/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" 41.142.242.99 - - [17/Feb/2017:21:31:47 +0200] 444 "HEAD http://ххх.xxx.xxx.xxx:80/phpmanager/ HTTP/1.1" 0 "-" "Mozilla/5.0 Jorgee" "-" Насчет xtables-addon подумаем, может скоро и будут 2 Quote Link to comment Share on other sites More sharing options...
Александр Рыжов Posted February 22, 2017 Share Posted February 22, 2017 (edited) Кому будет интересно, может попробовать в работе на старших кинетиках IDS suricata, пакет недавно был добавлен в Entware. Synology использует его в своих роутерных прошивках. Edited February 22, 2017 by Александр Рыжов 3 Quote Link to comment Share on other sites More sharing options...
Александр Рыжов Posted March 17, 2017 Share Posted March 17, 2017 В 18.02.2017 в 00:47, Dorik1972 сказал: Понимаю что приведенный ниже лог никакого отношения к nmap-ерам не имеет отношения ... но тем не менее вот таких "красавчиков" + nmap-еров пруд пруди..... эх ну не хватает еще xtables-addon чтоб "давить гнид" и "завешивать" им запрсы минут на 20-30 .... Кстати, есть опыт по «завешиванию» сканирующих SSH с последующим логом красавцев в twitter'e:) Quote Link to comment Share on other sites More sharing options...
Александр Рыжов Posted July 4, 2017 Share Posted July 4, 2017 В 18.02.2017 в 00:47, Dorik1972 сказал: эх ну не хватает еще xtables-addon С марта месяца компонент добавлен. Готовы расписать пример использования? 1 Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted July 4, 2017 Author Share Posted July 4, 2017 (edited) 13 часа назад, Александр Рыжов сказал: С марта месяца компонент добавлен. Готовы расписать пример использования? Вводная инструкция - https://xakep.ru/2011/08/23/58089/#toc02. + http://www.linuxcertif.com/man/8/xtables-addons/364384/ ... А дальше каждый "под себя" ... тут нет общего рецепта .. некой "кремлевской таблетки" от всех болезней p.s. на сколько я понимаю то с марта была добавлена поддержка на уровне ядра ... а вот остальное появилось чуть позже в виде opkg install xtables-addons_legacy Edited July 4, 2017 by Dorik1972 Quote Link to comment Share on other sites More sharing options...
Khaninea Posted September 26, 2017 Share Posted September 26, 2017 Добрый день. Перестало проходить подключение VPN по PPTP. Как можно исправить? Quote Link to comment Share on other sites More sharing options...
vasek00 Posted September 26, 2017 Share Posted September 26, 2017 В 04.07.2017 в 22:25, Dorik1972 сказал: Вводная инструкция - https://xakep.ru/2011/08/23/58089/#toc02. + http://www.linuxcertif.com/man/8/xtables-addons/364384/ ... А дальше каждый "под себя" ... тут нет общего рецепта .. некой "кремлевской таблетки" от всех болезней p.s. на сколько я понимаю то с марта была добавлена поддержка на уровне ядра ... а вот остальное появилось чуть позже в виде opkg install xtables-addons_legacy Интересен RAWDNAT RAWDNAT The RAWDNAT target will rewrite the destination address in the IP header, much like the NETMAP target. --to-destination addr[/mask] Network address to map to. The resulting address will be constructed the following way: All 'one' bits in the mask are filled in from the new address. All bits that are zero in the mask are filled in from the original address. See the RAWSNAT help entry for examples and constraints. Самое простое если две сети которые связываются находятся в одном поле IP адресов 192.168.1.2--роутер-------инет-------роутер-192.192.168.1.100 Скрытый текст /opt/lib/iptables # ls -l -rwxr-xr-x 1 root root 6056 Jun 2 15:53 libxt_ACCOUNT.so -rwxr-xr-x 1 root root 4520 Jun 2 15:53 libxt_CHAOS.so -rwxr-xr-x 1 root root 3736 Jun 2 15:53 libxt_DELUDE.so -rwxr-xr-x 1 root root 5288 Jun 2 15:53 libxt_DHCPMAC.so -rwxr-xr-x 1 root root 7684 Jun 2 15:53 libxt_DNETMAP.so -rwxr-xr-x 1 root root 3736 Jun 2 15:53 libxt_ECHO.so -rwxr-xr-x 1 root root 6388 Jun 2 15:53 libxt_IPMARK.so -rwxr-xr-x 1 root root 5424 Jun 2 15:53 libxt_LOGMARK.so -rwxr-xr-x 1 root root 6784 Mar 6 2017 libxt_NOTRACK.so -rwxr-xr-x 1 root root 6384 Jun 2 15:53 libxt_RAWDNAT.so -rwxr-xr-x 1 root root 6336 Jun 2 15:53 libxt_RAWSNAT.so -rwxr-xr-x 1 root root 3736 Jun 2 15:53 libxt_STEAL.so -rwxr-xr-x 1 root root 3736 Jun 2 15:53 libxt_SYSRQ.so -rwxr-xr-x 1 root root 4664 Jun 2 15:53 libxt_TARPIT.so -rwxr-xr-x 1 root root 4820 Jun 2 15:53 libxt_condition.so -rwxr-xr-x 1 root root 5288 Jun 2 15:53 libxt_dhcpmac.so -rwxr-xr-x 1 root root 5168 Jun 2 15:53 libxt_fuzzy.so -rwxr-xr-x 1 root root 8568 Jun 2 15:53 libxt_geoip.so -rwxr-xr-x 1 root root 4340 Jun 2 15:53 libxt_gradm.so -rwxr-xr-x 1 root root 9600 Jun 2 15:53 libxt_iface.so -rwxr-xr-x 1 root root 7864 Jun 2 15:53 libxt_ipp2p.so -rwxr-xr-x 1 root root 6320 Jun 2 15:53 libxt_ipv4options.so -rwxr-xr-x 1 root root 6796 Jun 2 15:53 libxt_length2.so -rwxr-xr-x 1 root root 4936 Jun 2 15:53 libxt_lscan.so -rwxr-xr-x 1 root root 9608 Jun 2 15:53 libxt_pknock.so -rwxr-xr-x 1 root root 6192 Jun 2 15:53 libxt_psd.so -rwxr-xr-x 1 root root 6232 Jun 2 15:53 libxt_quota2.so -rwxr-xr-x 1 root root 14748 Mar 6 2017 libxt_state.so /opt/lib/iptables # Quote Link to comment Share on other sites More sharing options...
corder Posted November 21, 2017 Share Posted November 21, 2017 (edited) Здравствуйте. В моем случае директория netfilter.d находится не в /opt/etc/netfilter.d/, а в /opt/etc/ndm/netfilter.d/. Подскажите, это ошибка в описании, или же нужно создать директорию netfilter.d прямо в etc? Положил скрипт в /opt/etc/ndm/netfilter.d/, дал права 755, iptabless установлен, однако после перезагрузки устройства в журнале появилось это: Opkg::Manager: /opt/etc/ndm/netfilter.d/001filter-rules.sh: iptables: Resource temporarily unavailable. Что не так? Скрипт копировал прямо отсюда в редактор mcedit Edited November 21, 2017 by corder Quote Link to comment Share on other sites More sharing options...
Le ecureuil Posted November 23, 2017 Share Posted November 23, 2017 В 11/21/2017 в 17:53, corder сказал: Здравствуйте. В моем случае директория netfilter.d находится не в /opt/etc/netfilter.d/, а в /opt/etc/ndm/netfilter.d/. Подскажите, это ошибка в описании, или же нужно создать директорию netfilter.d прямо в etc? Положил скрипт в /opt/etc/ndm/netfilter.d/, дал права 755, iptabless установлен, однако после перезагрузки устройства в журнале появилось это: Opkg::Manager: /opt/etc/ndm/netfilter.d/001filter-rules.sh: iptables: Resource temporarily unavailable. Что не так? Скрипт копировал прямо отсюда в редактор mcedit Надо флаг -w добавлять к своим командам + еще желательно полный путь к бинарнику, иначе есть возможность случайно зацепить не тот. Quote Link to comment Share on other sites More sharing options...
Dorik1972 Posted November 24, 2017 Author Share Posted November 24, 2017 (edited) 10 часов назад, Le ecureuil сказал: Надо флаг -w добавлять к своим командам + еще желательно полный путь к бинарнику, иначе есть возможность случайно зацепить не тот. Век живи век учись ... в шапке я таки неправильно "вколотил" путь... чисто автоматически .. А вот о -w можно поподробнее ибо даже если iptables -h --table -t table table to manipulate (default: `filter') --verbose -v verbose mode --wait -w wait for the xtables lock --line-numbers print line numbers when listing --exact -x expand numbers (display exact values) И переделать запуск /opt/sbin/iptables -w .... то результат такой же Nov 24 08:57:59ndmOpkg::Manager: /opt/etc/ndm/netfilter.d/010-filter-rules.sh: iptables: Resource temporarily unavailable. Хотя если глянуть iptables -nL то все добавленные правила присутствуют ....... Явно чего-то недопонимаю ..... чуть чуть подробнее плиз по "Хитрости" с флагом -w .... Edited November 24, 2017 by Dorik1972 Quote Link to comment Share on other sites More sharing options...
Le ecureuil Posted November 24, 2017 Share Posted November 24, 2017 1 час назад, Dorik1972 сказал: Век живи век учись ... в шапке я таки неправильно "вколотил" путь... чисто автоматически .. А вот о -w можно поподробнее ибо даже если iptables -h --table -t table table to manipulate (default: `filter') --verbose -v verbose mode --wait -w wait for the xtables lock --line-numbers print line numbers when listing --exact -x expand numbers (display exact values) И переделать запуск /opt/sbin/iptables -w .... то результат такой же Nov 24 08:57:59ndmOpkg::Manager: /opt/etc/ndm/netfilter.d/010-filter-rules.sh: iptables: Resource temporarily unavailable. Хотя если глянуть iptables -nL то все добавленные правила присутствуют ....... Явно чего-то недопонимаю ..... чуть чуть подробнее плиз по "Хитрости" с флагом -w .... Скорее всего во время вашего обновления netfilter NDMS пытается еще раз перезаписать таблицу и в итоге вы получаете вот это. Quote Link to comment Share on other sites More sharing options...
naileddeath Posted December 30, 2017 Share Posted December 30, 2017 (edited) Добрый день! Скрипт поставил, в журнале не ругается, правила появились. Теперь терзают сомнения все ли правильно сделал. OPKG стоит на ext2. Edited January 11, 2018 by naileddeath Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.