Networking

Apache – Top 10 IP addresses accessing your Apache webserver

Default log paths /var/log/http/access_log [For RedHat based systems] /var/log/apache2/access.log [For Debian based systems] /var/log/http-access.log [For FreeBSD] Command Output 5482 103.28.37.1785356 66.249.78.1681977 66.249.93.1451962 157.55.39.2511924 66.249.93.1421921 66.249.93.1481890 64.233.173.1781860 108.61.183.1341841 64.233.173.1821582 157.55.39.251 Command explain awk ‘{ print $1}’ access.log – take the access.log and print first group (separated by white space) sort – sort records uniq -c – …

Apache – Top 10 IP addresses accessing your Apache webserver Read More »

SilverCrest wireless door bell – forget learned devices – solved

Device: HG04115A-RX IAN: 303733 This week I had to change the battery in my cheap wireless doorbell device from Lidl shop. But unfortunately when I was a pairing device somebody open doors with a 433MHz contact sensor and the receiver learn it as a wireless button. It is quite funny because I inadvertently invented cheap …

SilverCrest wireless door bell – forget learned devices – solved Read More »

Fail2Ban – unban IP

First, you need to connect to the terminal and find the right jail. Open terminal iptables -L -n to find the rule name, it could be quite messy so I recommend skip this step 🙂 fail2ban-client status to show names of all fail2ban jails For F2B before v0.8.8 ffail2ban-client get YOURJAILNAMEHERE actionunban IPADDRESSHERE For F2B …

Fail2Ban – unban IP Read More »

Mikrotik P2P mangle rule – SOLVED

Its long time ago but MikroTik removed P2P matcher from mangle rule, so now you have to use L7 analyze to mangle this traffic. Here is code to paste to the terminal: /ip firewall layer7-protocol add name=P2Pmatch regexp=”^(\\x13bittorrent protocol|azver\\x01\$|get /scrape\\\ \?info_hash=get /announce\\\?info_hash=|get /client/bitcomet/|GET /data\\\?f\ id=)|d1:ad2:id20:|\\x08’7P\\)[RP]” /ip firewall mangle add action=mark-connection chain=prerouting layer7-protocol=P2Pmatch \ new-connection-mark=P2Pconnection passthrough=yes …

Mikrotik P2P mangle rule – SOLVED Read More »