Grep files with Powershell
Powershell can be used to search for content (with regex support) for files in a path by using Select-String: The output of the command looks like this for any results:
Read moreNetworking, system administration and more
Networking, system administration and more
Powershell can be used to search for content (with regex support) for files in a path by using Select-String: The output of the command looks like this for any results:
Read moreThese are some common PostgreSQL commands for things that I need to remember. Opening session This assumes linux authentication (default for Debian Linux). Run the psql command as the postgres user: Open a database with \c DBNAME: Showing Table Info Use \dt to show table information (same as show tables; […]
Read moreIn my network, a Juniper SRX cluster handles all DHCP leases (via an IP helper configured on the switches with DHCP snooping). These are the steps I used to get the DHCP server for SRX devices to work for Windows Deployment Services. Main DHCP Configuration The following configuration is set […]
Read moreThe PowerShell cmdlet Get-ADComputer can be used to retrieve the details for a computer account. You can use a filter if required. The usage of this cmdlet is like this: If no filter property is provided you will be prompted for the filter when running this cmdlet. Examples Some examples […]
Read moreTo test a users credentials you can start a process using Start-Process with the -Credential flag. As an example, to start cmd.exe and prompt for the username and password:
Read moreAfter I have deployed the vMX on a CentOS 7.4 host that has an IPv6 address for management, I noticed that IPv6 stopped working when the vMX was started. In my case, the IPv6 address was originally on the interface bond0. When the vMX starts a bridge interface is created […]
Read moreAfter upgrading Unifi on a Debian server running a Ubiquiti Unifi controller, I ran into an issue where the web interface would not load. After poking through the logs I found that the issue appeared to be with MongoDB. In the server log file located at /var/log/unifi/server.log for my install […]
Read moreQuite often people scan for WordPress installs by checking to see if a HTTP request can be made to /xmlrpc.php. Since I do not run WordPress at all it is low hanging fruit to block the source IP that makes a HTTP request for that to my web servers. The […]
Read morePart of a standard server setup for me includes installing SNMPD for remote monitoring of hosts. A simple SNMPD configuration template can be found below. You will need to change these variables: COM_NAME: This should be the community name that your SNMP poller users when connecting to the host. PREFIX: […]
Read moreBy default, the Ubiquiti Unifi controller runs on port 8443 for inbound HTTPS requests to the web interface. I instead wanted to change this to listen on the standard HTTPS port (443) and I wanted my own valid SSL to be used to access the web interface. The easiest way […]
Read more