Linux

Squid site restrictions

I needed a way to block some websites permanently and others outside of certain hours. After looking at some inline solutions I realised that I could easily do what was needed with squid alone. I created the following ACLs in squid’s config file : acl blockedsites url_regex -i “/etc/squid/blocked.txt” acl bannedsites url_regex -i “/etc/squid/banned.txt” acl […]

Read More
Scripting

Detecting changes to your network services/damons

This is a tutorial to detect changes in port from hosts on your network. The basic approach is to ping every available address upon your subnet and see which ones are up by detecting replies. If you install the package libperl-net-ping you can use the following script to see which hosts upon your LAN are […]

Read More
Security

nmap/nbtscan scan for å finne pc med åpen port

Dette scriptet scanner IP-er fra ei fil og finner ut hvem som har en spesiell port åpen.Lim inn følgende script kode i fila portLookup.sh #!/bin/bashNETWORKTARGET=$1PORT=$2FN=”port”# Scan Network Input File for active hosts saving IPS to $FNips.txtnmap -sS -p $PORT -n -iL $NETWORKTARGET -oG – | grep open | awk ‘/[1-9].[1-9]/ {print $2}’ > ${FN}ips.txt# use […]

Read More