Networking
Mikrotik – DHCP Options – TFTP server
Sometimes you need to push the TFTP server value as part of the DHCP process, for example, this is used in most VoIP systems. The VoIP phone use the TFTP server to download configuration files. Here I will show you how to set this value in the Mikrotik DHCP server. 1. Boring stuff The boring …
Standard ICMP return TTL values by OS
Here are the default TTL values of different devices / Operating Systems : Device / OS Version Protocol TTL AIX TCP 60 AIX UDP 30 AIX 3.2, 4.1 ICMP 255 BSDI BSD/OS 3.1 and 4.0 ICMP 255 Compa Tru64 v5.0 ICMP 64 Cisco ICMP 254 DEC Pathworks V5 TCP and UDP 30 Foundry ICMP 64 FreeBSD 2.1R …
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 »
Unable connect Windows 10 to Mikrotik L2TP/IPsec behind NAT – Solved
Open regedit (Windows + R -> regedit -> enter) find key : Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent. Create new DWORD value with name : AssumeUDPEncapsulationContextOnSendRule and value 2 Restart PC and enjoy the L2TP/IPsec without problems.
Windows – map network driver from CMD
Sometimes you need map network drivers in command line(cmd) for example if you are preparing some .bat files etc. At Windows, it is quite simple all you need is net use command. Quite simple right? No big deal. One note to end. All user got their own mapped drives. So if you open command lines …
Get MAC address of AP what your WiFi is connected
Sometimes you need to know exactly what AP your windows device is connected to for example if you are tuning your multi-AP network where many AP got the same SSID. The value what are you looking for is named BSSID. Windows At Windows you need to open command line (Win+R and type cmd enter) macOS …
Get MAC address of AP what your WiFi is connected 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 …
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 …