scp to a port

Quick reminder on how to transfer a file to a specific port, the option is upper -P

$ scp -P 91307 profile-pic.jpg superuser@{target IP}:/tmp
people-pic.jpg                        100%   45KB 303.5KB/s   00:00 

The port 91307 is being natted using VirtualBox, this particular port is listening on port 22 which in turn is being presented to the public IP

Firewall command might be needed to open the port, in this example in order to open tcp traffic thru port range 8091-8099 use the firewall-cmd to accomplish that

# firewall-cmd --add-port=8091-8099/tcp

# firewall-cmd --list-ports
80/tcp 443/tcp 8080/tcp 8443/tcp 8091-8099/tcp

Redhat has a great guide on this, here.

Once you are satisfied with the rules in place, make them permanent

# firewall-cmd --runtime-to-permanent


grep -v or egrep

Filter using -v option and -e options grep "Client ip" /var/log/messages | awk '{print $10}' | grep -v -e "Protocol"…

SQL Dumps & Restore

Take a dump or leave a dump? First backup all the databases mysqldump -u root -p --all-databases > all_db_dump_04APRIL2020.sql You…

Linux Malware Detection

Im running CentOS in the lab environment, running into some issues with NOC saying botnet hijacked one or some of…

Lab Hack: Apache URI purgatory

To HTTP or to HTTPS, that is the question. This lab hack takes me deep into the domain.conf which controls…