Posts

Showing posts with the label ip

Someone using Tencent servers have been attacking my websites

Image
Someone using Tencent servers have been attacking my websites, mostly from China, Singapore, Vietnam, but also the US and Brazil. I usually have around 1K people surfing my website at any given time. Occasionally my website https://www.gematrix.org is getting published in a blog about Gematria and numeric values and I get higher traffic organically.  This attack was happening on multiple websites I own, not just this one, but the attack was made more brutally on Gematrix and at this website I investigated it. Lately, my website started crushing down. Did not worked properly. Responses were very slow.  Looking a bit more deeply into it, I could see I have around 12K visitors at the same second in my website which caused the delay. Like thousands of thousands requests per seconds. I did two things: 1. One of them is what I call "scale better": I have improved the way I handle requests, improved the caching and improved the database querying, schema and access.  Thanks god I...

Caddy webserver to prevent access from external machines on the network

How to protect your local caddy installation by preventing other machines outside of your localhost and local computer from accessing your device. Create rule: (block_outcoming) {        @denied not client_ip 127.0.0.1 ::1         handle @denied {                 respond "No access"         } }   Then inside your website configuration just add import  block_outcoming   E.g.: :80 {     import block_outcoming     root * /web/html }

Changing default route in Linux

Route ip route show sudo ip route del default sudo ip route add default via 192.168.0.1 dev wlan0 (those changes will not keep for reboot)