MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
February
Sun Mon Tue Wed Thu Fri Sat
     
23 24 25
26 27 28        
2017
Months
FebMar
Apr May Jun
Jul Aug Sep
Oct Nov Dec


Tue, Feb 21, 2017 11:21 pm

Dovecot not responding

A user reported that she wasn't receiving any email. When I logged into the mail servers, which runs Dovecot for POP3/POP3S and used Telnet to connect to port 110, the well-known port for POP3, I didn't get any response after I entered the user command, so I exited to the telnet prompt with Ctrl-].

$ telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
user nell
^]
telnet> quit
Connection closed.
$

I logged into the root account and checked today's and yesterday's maillog files for any references to Dovecot or POP3 issues, but saw none.

# grep -i dovecot /var/log/maillog
# grep -i dovecot /var/log/maillog.1
# grep -i pop3 /var/log/maillog.1
# grep -i pop3 /var/log/maillog
#

[ More Info ]

[/network/email/dovecot] permanent link

Tue, Feb 21, 2017 9:09 pm

Viewing the list of IP address ranges for AmazonAWS

If you need to create firewall rules for outgoing connectivity to Amazon Web Services (AWS) addresses, you can obtain a complete listing of the IP address ranges that Amazon uses in JavaScript Object Notation (JSON) format from AWS IP Ranges Are Now Available in JSON Format - the download URL for the file is https://ip-ranges.amazonaws.com/ip-ranges.json

I downloaded the IP address range file from https://ip-ranges.amazonaws.com/ip-ranges.json using cURL, which is present on Apple OS X/macOS systems and is available for Linux and many other operating systems, including Microsoft Windows - see Releases and Downloads.

$ curl -o ip-ranges.json https://ip-ranges.amazonaws.com/ip-ranges.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   99k  100   99k    0     0   191k      0 --:--:-- --:--:-- --:--:--  191k
$

The following Python script can be used to extract just the Classless Inter-Domain Routing (CIDR) address blocks, i.e., the ip_prefix information from the JSON data stored in the ip-ranges.json file downloaded from the Amazon website and display it.

#!/usr/bin/python
import json

data = json.load(open('ip-ranges.json'))
for d in data["prefixes"]:
    print d["ip_prefix"]

[ More Info ]

[/languages/python] permanent link

Mon, Feb 20, 2017 10:43 pm

Determining the last system image backup time for a Windows 10 system

I backed up a Windows 10 system to an external USB disk drive using the backup utility that comes with the operating system that can be run by right-clicking on the Windows Start button then choosing Control Panel then Backup and Restore (Windows 7), which is found beneath System and Security, and then choosing Create a system image. If you create a system in that manner and then later wish to know the date and time you backed up the system without reattaching the drive you used, you can do so from a command prompt window with administrator privileges by using the wbadmin get versions command as shown below:

C:\WINDOWS\system32>wbadmin get versions
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2013 Microsoft Corporation. All rights reserved.

Backup time: 2/19/2017 8:31 PM
Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(E:)
Version identifier: 02/20/2017-01:31
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {d4a62a80-ac6f-4aba-8886-6ba570c1284a}


C:\WINDOWS\system32>

Once you have the version identifier(s), you can use it to view the details regarding what volumes were backed up on the system to the external USB drive using a command in the form wbadmin get items -version:version_id.

[ More Info ]

[/os/windows/utilities/backup] permanent link

Sun, Feb 19, 2017 10:45 pm

Deleting a hidden file from a command prompt on a Windows system

The del command can be used at a command prompt on a Microsoft Windows system to delete files. But, if you try to delete a file using that command without specifically specifying that you wish to apply the command to a hidden file, you will receive a message stating windows could not find the file. To delete a hidden file, you need to use the /ah parameter before the file name as shown below.
C:\Users\enzo\Documents>dir /ah *.swp
 Volume in drive C is Windows
 Volume Serial Number is B688-ED25

 Directory of C:\Users\enzo\Documents

02/18/2017  12:51 PM            12,288 .system.html.swp
               1 File(s)         12,288 bytes
               0 Dir(s)  1,954,264,215,552 bytes free

C:\Users\enzo\Documents>del .system.html.swp
Could Not Find C:\Users\enzo\Documents\.system.html.swp

C:\Users\enzo\Documents>del /ah .system.html.swp

C:\Users\enzo\Documents>

The syntax for the del command is shown below:

C:\>del /?
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

  names         Specifies a list of one or more files or directories.
                Wildcards may be used to delete multiple files. If a
                directory is specified, all files within the directory
                will be deleted.

  /P            Prompts for confirmation before deleting each file.
  /F            Force deleting of read-only files.
  /S            Delete specified files from all subdirectories.
  /Q            Quiet mode, do not ask if ok to delete on global wildcard
  /A            Selects files to delete based on attributes
  attributes    R  Read-only files            S  System files
                H  Hidden files               A  Files ready for archiving
                I  Not content indexed Files  L  Reparse Points
                -  Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.

C:\>

[/os/windows/commands] permanent link

Sat, Feb 18, 2017 3:30 pm

Changing the host name for a Windows system from a command prompt

There are a variety of ways you can determine the system name for a Windows computer from a command line interface (CLI), such as a command prompt or PowerShell prompt window. But what if you wish to rename the computer from a command line interface? You can obtain a command prompt and then use a Windows Management Instrumentation Command-line (WMIC) command in the form shown below where oldname is the curent name of the system and newname is the new name you wish to assign to the system.

wmic computersystem where caption='oldname' rename newname

[ More Info ]

[/os/windows/commands/wmic] permanent link

Fri, Feb 17, 2017 10:55 pm

Email to Text Message

If you would like to be notified of a system event by a SMS messsage, i.e., a text message, or otherwise have a need to send information from a computer to a phone by a text message, you can use a text to email capability provided by some phone service providers. To send a text message via email to a Verizon user, you can use the Verizon phone number for the person followed by @vtext.com - don't put any dots nor dashes in the phone number, just the digits of the phone number. E.g., if the person's phone number is 555-765-4321, you would send the message to 5557654321@vtext.com. If the person uses Sprint for phone and text messaging service, you would append @messaging.sprintpcs.com to the 10-digit phone number, i.e., 5557654321@messaging.sprintpcs.com. If the user has AT&T for his/her phone service, you can text the user by appending @txt.att.net to the number, e.g. 5557654321@txt.att.net. For T-Mobile, you can append @tmomail.net to the phone number.

[ More Info ]

[/network/email] permanent link

Tue, Feb 14, 2017 11:14 pm

Determining S.M.A.R.T disk drive status from a command prompt

Many hard disk drives have a Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T.) capability. On a Microsoft Windows system, you can use a utility such as SpeedFan to query the S.M.A.R.T, or SMART, information for a drive. You can also check the status of a drive using a Windows Instrumentation Command-line (WMIC) command by issuing the command wmic diskdrive get status at a command prompt, though you won't get the same level of detail. But if you have multiple drives in or atached to the system, you will need to use an additional parameter to identify which status applies to which drive. You could include the size and/or model, e.g.:

C:\Users\Lila>wmic diskdrive get status, size, model
Model                                   Size           Status
Seagate Backup+  Desk SCSI Disk Device  5000970240000  OK
Seagate Backup+ Desk USB Device         4000776192000  OK
Generic- Compact Flash USB Device                      OK
Generic- SD/MMC USB Device                             OK
Generic- MS/MS-Pro USB Device                          OK
WD My Book 1140 USB Device              2000363420160  OK
Generic- SM/xD-Picture USB Device                      OK
WDC WD4003FZEX-00Z4SA0 ATA Device       4000784417280  OK


C:\Users\Lila>

[ More Info ]

[/os/windows/commands/wmic] permanent link

Sun, Feb 12, 2017 5:44 pm

Configuring Windows 7 to hibernate on low UPS battery power

If you have an uninterruptible power supply (UPS) to provide battery backup for a Microsoft Windows system in the event of a power outage, you may want to change the default setting for the action that Windows takes when the battery charge is nearing depletion. The default setting is to put the system in sleep mode where the system saves the memory state to disk and stops most activities on the system, so that the system is using very little power. But, if the battery charge becomes totally depleted, if a system is in sleep mode when that happens, you will lose any unsaved work. You can reconfigure Windows to hibernate the system, instead. When the system goes into hibernation, the contents of memory are saved to disk in such a way that when the system is rebooted, you will be back to the state it was in before it was hibernated, so you haven't lost unsaved work, such as open documents in a word processor, etc.

[ More Info ]

[/os/windows/win7] permanent link

Sat, Feb 11, 2017 10:27 pm

Using Python to query an SQLite database and return a count of records

I have an SQLite database that I use to track work requests on my MacBook Pro running OS X El Capitan (10.11.6) . Every week I need to determine the number of change requests I've reviewed and approved in the last week. I have been running SQL commands from a text file using sqlite3, but I wanted to start using a Python script, instead, since I want to everntually perform some additional queries as well and display the results as a web page. Initially, I had some problems displaying the record count, but found I could use cursor.fetchone() to display the count. The script I currently have consists of the following code:

#!/usr/bin/python

import sqlite3
conn = sqlite3.connect('/Users/jasmith1/Documents/Work/CRQ/CRQ.db')
cursor = conn.cursor()

sql = 'SELECT COUNT(*) FROM Tasks WHERE Approved >= date(CURRENT_DATE,"-7 day")'
cursor.execute(sql)
result = cursor.fetchone()
numApproved = result[0]
print numApproved

The first step I need to take is to import the sqlite3 module for use in Python. I then need to create a connection object for the database which I assign to conn. After that I need to create a cursor instance that I will use to execute an SQL statement. I assign the SQL statement to the variable sql (the name is arbitrary) and then execute the statement with cursor.execute(sql). The variable result is then assigned the results of cursor.fechone(). If I printed the contents of the result variable, I would see (5,), if the count was 5, since the result is a tuple with one element, but I want to see just the number, so I set numApproved to be result[0]. Instead of setting numApproved to result[0] and printing numApproved, I could skip a step and use the following two lines after sursor.execute(sql):

(numApproved,) = cursor.fetchone()
print numApproved

If I make the script excecutable with chmod 755 and then run the script, I will then see just the number of reccords approved within the last week:

$ chmod 755 weeklyApprovalCount.py
$ ./weeklyApprovalCount.py
5

References:

  1. sqlite3 — DB-API 2.0 interface for SQLite databases
    Python documentation

[/languages/python] permanent link

Fri, Feb 10, 2017 10:37 pm

Attempting to kill unkillable processes

When I tried to update WireShark on a Windows 10 system to version 2.2.4, I saw the message "Wireshark or one of its associated programs is running. Please close it first."

Wireshark or one of its associated programs is running

I had to forcibly terminate two Wireshark processes with the Windows Task Manager prior to that message appearing in order to proceed with the upgrade, since I had seen a message that the installation could not proceed with Wireshark running, yet those instances of Wireshark wouldn't close when I tried to close them normally; one of the two was due to my trying a second time to start Wireshark when there was a long delay before it appeared.

I ran the Windows Task Manager with administrator privileges by typing Task Manager in the Cortana "Ask me anything" field and then right-clicking on Task Manager when it was returned in the search results. I saw Dumpcap, which is a process Wireshark and TShark run to perform packet capture, listed in the process list, so clicked on it to select it and then clicked on the End Task button, but that didn't actually terminate the process.

[ More Info ]

[/os/windows/processes] permanent link

Thu, Feb 09, 2017 10:51 pm

Installing MySQL on OS X El Capitan

The steps below can be taken to install the MySQL relational database management system software on an Apple OS X/macOS system. The steps were taken for MySQL version 5.7.17 on a MacBook Pro laptop running OS X El Capitan, but should be similar, if not exactly the same for other versions of MySQL and on other versions of OS X.

[ More Info ]

[/os/os-x] permanent link

Wed, Feb 08, 2017 8:41 pm

Running SQL commands from a text file using sqlite3

Every week I need to determine the number of tasks I reviewed and approved in the prior week. I track the tasks in a database on my MacBook Pro laptop using the SQLite utility that is part of the OS X operating system - see Using SQLite. I have a database named "CRQ" that contains a table named "Tasks". The schema for the table is shown below; approval dates are stored as integers; SQLite does not have a storage class specifically for dates, instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values1.

$ sqlite3 ~/Documents/Work/CRQ/CRQ.db
SQLite version 3.8.10.2 2015-05-20 18:17:19
Enter ".help" for usage hints.
sqlite> .schema Tasks
CREATE TABLE "Tasks" (
`CRQ`	TEXT NOT NULL,
`Task`	TEXT NOT NULL,
`URL`	TEXT,
`Received`	INTEGER,
`Reviewed`	INTEGER,
`Approved`	INTEGER,
`Notes`	TEXT,
`Summary`	TEXT
);
sqlite> .exit
$

I can open the database and manually type the command to count the records with an approval date on or after a date I specify using an SQL command like the one below:

$ sqlite3 ~/Documents/Work/CRQ/CRQ.db
SQLite version 3.8.10.2 2015-05-20 18:17:19
Enter ".help" for usage hints.
sqlite> SELECT COUNT(*) FROM Tasks WHERE Approved >= '2017-02-01';
11
sqlite>

[ More Info ]

[/software/database/sqlite] permanent link

Tue, Feb 07, 2017 9:43 pm

Attachments not visible in Outlook 2016

I recently received an update from Microsoft® Office 2011 on my MacBook Pro laptop to Microsoft Office 2016. Included with that update was the 2016 version of Microsoft Outlook for Mac, though if I click on Outlook from Outlook's menu bar and then select About Outlook, I see the following version information (image):

Version 15.27 (161010)
Product ID: 03109-000-000001
License: Volume License

One annoying issue I've encountered is that I don't see a way to view attachments sent with some messages within Outlook. I can see a paperclip icon to the right of the sender's name in the left pane of the outlook window, which indicates the message has been received with an attachment, but in the right pane where the contents of the window is displayed, there is no indication that the message has an attachment. And, if I double-click on the message to open it in a separate window there is no indication the message has an attachment. The only way I've found to easily gain access to the attachment is to view the message in Outlook Web App in a web browser. In its right pane, I see a "To:" line followed by a "CC:" line and then an "Attachments:" line with the name of the attachment shown. I can click on the attachment name to open of save it.

In Outlook 2016, if I right-click on the first message where I observed this problem and choose View Source, I see the following in the header lines, which indicates the message does indeed have an attachment:

Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes

[ More Info ]

[/network/email/clients/outlook/2016] permanent link

Mon, Feb 06, 2017 10:59 pm

Using Python scripts with Apache on OS X El Capitan

If you've got the Apache web server software working under OS X El Capitan, but want to use Python scripts with Apache, the following steps will allow you to run Python scripts from a cgi-bin directory.

First, ensure that the hash sign (#) is removed from the LoadModule cgi_module libexec/apache2/mod_cgi.so in /etc/apache2/httpd.conf. If you need to remove the hash/pound sign, restart Apache after modifying the file, which you can do with sudo apachectl restart. You will also need to use the sudo command to edit the file, if you edit it with a text editor such as GNU nano or vi.

[ More Info ]

[/os/os-x/apache] permanent link

Sun, Feb 05, 2017 10:51 pm

Using Perl with Apache under OS X El Capitan

If you've got Apache running on your Mac OS X system and want to be able to display the output of Perl programs, you need to remove the hash sign (#) from the following line in /etc/apache2/httpd.conf.

#LoadModule cgi_module libexec/apache2/mod_cgi.so

You will neeed to edit the file with a text editor, such as the TextEdit app found in the Applications directory, or GNU nano or vi. And you will need to run the editor with root, i.e., administrator privileges by using the sudo command in order to be able to save modifications to the file. E.g.:

sudo nano /etc/apache2/httpd.conf

[ More Info ]

[/os/os-x/apache] permanent link

Sat, Feb 04, 2017 10:44 pm

PHP for Apache on OS X El Capitan

If you are running an Apache web server under OS X El Capitan and want to use PHP with Apache, you will need to take some additional steps after you've got Apache running on OS X/macOS. Once you've got Apache working on the system, you can create a .php file, e.g. phptest.php and have the page displayed by your browser if you visit the page, but PHP code within the page won't be executed. E.g., suppose the phptest.php page contains the following code:

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>PHP Test</title>
</head>

<body>

<h2>A test page</h2>

<?php phpinfo(); ?>

</body>
</html>

If I visit the page using a browser, the HyperText Markup Language (HTML) code on the page will be displayed, e.g. the "A test page" heading will be displayed, but the information that the phpinfo() command would display regarding the PHP settings for a system on which PHP is working won't be displayed. You could also try a simple PHP echo command, e.g. <?php echo "This is the output from a PHP echo command."; ?>, but the output from that command would not be displayed, either.

[ More Info ]

[/os/os-x/apache] permanent link

Fri, Feb 03, 2017 10:54 pm

Running an Apache web server under OS X El Capitan

Apple's OS X/macOS operating system (OS) comes with the Apache webserver software, which I decided to enable on my MacBook Pro laptop running OS X El Capitan, version 10.11.6 on the laptop.

The Apache web server software isn't running by default and you can no longer enable it through the Sharing option under System Preferences as in some earlier versions of OS X, but you can start it from a command line interface (CLI) by opening a Terminal window (Terminal is found in the Applications/Utilities folder), with the command sudo apachectl start. Once you start the software, you will see the system is listening on the well-known port for Hypertext Transfer Protocol (HTTP) connections, port 80, by using the netstat command.

$ sudo apachectl start
Password:
$ netstat -a | grep http | grep LISTEN
tcp46      0      0  *.http                 *.*                    LISTEN     
$

[ More Info ]

[/os/os-x] permanent link

Thu, Feb 02, 2017 10:04 pm

UltraVNC not responding to connection attempts

A user reported he was unable to connect to a Microsoft Windows 8 system functioning as a VNC server using UltraVNC. The remote vncviewer program was reporting "Failed to connect to server !" I logged into the system and verified that the system was listening on the registered port for VNC, port 5900 using the netstat command.
C:\Users\Collen>netstat -a | find "5900"
  TCP    0.0.0.0:5900           Speleologist:0         LISTENING

C:\Users\Collen>

I used windump, a free packet capture tool for Microsoft Windows systems, similar to the tcpdump tool found on OS X/macOS and Linux systems, to verify that the system was seeing the incoming connections to network port 5900.

[ More Info ]

[/os/windows/software/remote-control/vnc/ultravnc] permanent link

Wed, Feb 01, 2017 10:42 pm

Allowing the untrusted interface on a Juniper SRX router/firewall to be pinged

If you wish to allow the untrust interface, which is usually the Internet-facing interface on a Juniper Networks SRX router/firewall running the Junos operating system, to be pinged from external systems, you can use the command set security zone security-zone untrust interface ge-0/0/0.0 host-inbound-traffic system-services ping after placing the device in configuration mode with the configure command, presuming, of course, that the untrust interface is ge-0/0/0.0. If it is some other port on the router, substitute that port identifier, instead.

root@Alder> configure
Entering configuration mode

[edit]
root@Alder# set security zone security-zone untrust interface ge-0/0/0.0 host-inbound-traffic system-services ping

[edit]
root@Alder# commit
commit complete

[edit]
root@Alder#

Afer committing the configuration, you should be able to successfully ping the IP address of the untrusted, i.e., Internet side of the device.

[/security/firewalls/SRX] permanent link

Tue, Jan 31, 2017 11:10 pm

Creating a rescue configuration for a Juniper SRX Firewall

You can create a rescue configuration to be used in the event you make some change to a Juniper Networks SRX router/firewall, which runs Junos OS, that makes the device inaccessible. With a rescue configuration saved on the device, you can return the router/firewall to a known operational state. The rescue configuration saved on the device can provide a last resort means of quickly restoring the device to operational status. You can use either the web-based graphical user interface (GUI) method to create a saved rescue configuration via a web browser connection to the system or a command line interface (CLI) method.

[ More Info ]

[/security/firewalls/SRX] permanent link

Mon, Jan 30, 2017 10:49 pm

Checking a website's security certificate with OpenSSL

You can use OpenSSL, which is commonly installed on Mac OS X and Linux systems and which is also available for other operating systems (the source code can be downloaded from OpenSSL Downloads and a Windows implementation is available at OpenSSL for Windows), to check the security certificate of a website using an openssl command in the form openssl s_client -showcerts -connect fqdn:port where fqdn is the fully qualified domain name (FQDN) of the website and port is the port that the website is listening on for HTTPS connections, which is usually well-known port 443, though it may sometimes be another port, such as the registered port 8443. The showcerts option instructs openssl to show all certificates in the public key certificate chain.

[ More Info ]

[/security/encryption/openssl] permanent link

Sun, Jan 29, 2017 7:52 pm

Setting up the Windows Subsystem for Linux on Windows 10

With the Anniversary Edition of the Microsoft Windows 10 operating system (OS), Microsoft provides a an Ubuntu-based Bash shell that will allow you to run Linux software on your Microsoft Windows 10 system. If you are unsure whether the Anniversary Edition update to Windows 10 is installed on a system, you can follow the steps listed at Determining which version of Windows 10 is installed. You can also use the instructions at Determining the version of Microsoft Windows from the command line. The Anniversary Edition is version 1607 of Windows. Or just checking the software build will reveal whether the Anniversary Edition is installed; if you see "build 14393" or later, then the Anniversary Edition is installed on the system.

The Windows system will also need to be using the 64-bit version of Windows 10 rather than the 32-bit version - see Determining if your version of Windows is a 32-bit or 64-bit version for methods that can be used to determine if the installed version of Windows is a 32-bit or 64-bit version.

If the version of Windows is appropriate, then you can follow these step by step instructions to install the Linux subsystem.

[/os/windows/win10] permanent link

Sat, Jan 28, 2017 9:46 pm

Setting the default mail application on Windows 10

If you wish to set or change the default mail app on a Microsoft Windows 10 system, you can take the following steps:
  1. Click on the Windows Start button.
  2. Click on Settings.
  3. Click on System.
  4. Click on Default apps.
  5. Click on "Choose a default" under Email.
  6. You should then see a list of email applications on the system; click on the one you wish to be the default mail application.
  7. Once you've chosen an email program, you can click on the "X" at the upper, right-hand corner of the window to close it.

[ More Info ]

[/os/windows/win10] permanent link

Fri, Jan 27, 2017 10:29 pm

Changing the UltraVNC passwords

To change the password used for connectivity to a system running the UltraVNC free and open-source software that provides remote-administration/remote-desktop-software functionality for Microsoft Windows, select the icon representing UltraVNC in the system tray; it has an eye within it.

UltraVNC system tray icon

Right-click on it and select Admin Properties. At the Admin Properties window, you can type a password in the "View-Ony Password" that can be used to allow remote users access to the system via VNC. It will only check the first 8 characters of a password.After making any password change, click on the Apply button.

[ More Info ]

[/os/windows/software/remote-control/vnc/ultravnc] permanent link

Thu, Jan 26, 2017 10:56 pm

You can't open the application "Firefox.app" because it is not responding

I killed Firefox on my MacBook Pro laptop running OS X Yosemite (10.10.5) by clicking on the Apple icon at the upper, left-hand corner of the screen then selecting Force Quit and then selecting Firefox and clicking on the Force Click button. But when I tried to reopen Firefox, I saw the message 'You can't open the application "Firefox.app" because it is not responding.'

I clicked on OK and used Force Quit Applications again. I saw Firefox in the list and again forced it to quit. I then clicked on the Firefox icon in the Dock at the bottom of the screen again, but Firefox didn't appear to open. I double-clicked on it again, but it still didn't appear to open, though it appeared in the Force Quit Applications list again with "not responding" appearing next to its entry in the list of open apps. I tried clicking on the Firefox icon in the Dock a third time and this time saw the 'You can't open the application "Firefox.app" because it is not responding' message again, though reopening Force Quit Applications again did not show "not responding" next to the Firefox entry in its list. Nor was any other application listed as being unresponsive. I tried the Force Quit step again. Firefox remained in the list until I closed and reopened Force Quit Applications. Though Firefox wasn't in the Force Quit Applications list, I did see a process associated with Firefox when I used the ps command to view processes running on the system.

$ ps -ef | grep -i Firefox | grep -v grep
723184451  6861     1   0  8:46AM ??         0:00.03 /Applications/Firefox.app/Conte
nts/MacOS/plugin-container.app/Contents/MacOS/plugin-container /Library/Internet Plu
g-Ins/JavaAppletPlugin.plugin -greomni /Applications/Firefox.app/Contents/Resources/
omni.ja -appomni /Applications/Firefox.app/Contents/Resources/browser/omni.ja -appdi
r /Applications/Firefox.app/Contents/Resources/browser 1635 gecko-crash-server-pipe.
1635 org.mozilla.machname.776527788 plugin
$

[ More Info ]

[/os/os-x] permanent link

Wed, Jan 25, 2017 11:08 pm

Extracting information from a pem file

The X.509 standard is used to manage digital certificates used for public key encryption. One of the filename extensions used for X.509 certificates is .pem, which stands for "Privacy Enhanced Mail". These certificates are Base64 encoded DER certificates. If you have a .pem certificate and want to view information about the contents of the certificate, you can do so with OpenSSL software, which is commonly found on Linux and Mac OS X systems, but is available for other operating systems as well. If you just want to view the expiration date for a certificate you can use an openssl command like the one below:

$ openssl x509 -enddate -noout -in cacert.pem
notAfter=Aug 13 23:59:00 2018 GMT
$

[ More Info ]

[/security/encryption/openssl] permanent link

Tue, Jan 24, 2017 9:28 pm

Viewing available upgrades in Radia Client Automation Application Self-Service Manager

If the Radia Client Automation Self-Service Manager is in use on a Mac OS X system, the app may be found in the Applications/HPCA/Agent folder on the system's disk drive. You can double-click on Application Self Service Manager.app to see what software updates are available for the system. If the system isn't connected to the corporate network, e.g., if you need to establish a virtual private network (VPN) connection to be able to connect to the server, and you see the message "Error code 769 encountered during the connect. Do you want to work offline?", you can click on Yes to still see available updates stored on the system which you can install.

[ More Info ]

[/software/hpca] permanent link

Mon, Jan 23, 2017 10:07 pm

Firefox Profile Location on an Apple OS X System

The Firefox web browser stores information about its user settings and state in a "profile" directory for each user. On a Mac OS X system (now macOS), such as my MacBook Pro laptop, you can have Firefox open a Finder window showing you the relevant profile folder or you can find it from a command line interface (CLI), i.e., a shell prompt, by opening a Terminal window (you can find the Terminal program in the Applications/Utilities folder). For the latter method, you can see the location of the profile directory by issing the command ls -l ~/Library/Application\ Support/Firefox/Profiles. (you need to put a backslash before the space in the directory path)

$ ls -l ~/Library/Application\ Support/Firefox/Profiles
total 0
drwx------  53 jasmith1  ABC\Domain Users  1802 Jan 23 11:56 bgq13udo.default
$

[ More Info ]

[/network/web/browser/firefox] permanent link

Sun, Jan 22, 2017 9:32 pm

Minecraft memory usage

You can control the amount of memory used by Java for the Minecraft sandbox video game by setting parameters in the server_start.bat file located in the directory where the Minecraft software was installed. To reduce the contention of the Minecraft server with other software running on the system for the system's memory, you can specify the maximum memory it will consume with a Xmx parameter. E.g., the following example uses a server_start.bat file where the maximum of memory that Java will use for running the game software is 1 gigabyte (GB)

java -Xmx1G -Xms1G -jar forgeserver.jar nogui
PAUSE

[ More Info ]

[/os/windows/software/games/minecraft] permanent link

Sat, Jan 21, 2017 11:33 pm

Error occurred message when upgrading freeSSHd

I needed to upgrade freeSSHd, which is free Secure Shell (SSH) server software for Microsoft Windows systems, on a Windows 8 system. The software allows remote users to log into a command line interface on the Windows system via SSH and provides the capability to transfer files via the SSH File Transfer Protocol (SFTP). When I attempted to install the latest version of the software over a prior version, however, the installation was unsuccessful. If you see the following error message, you may need to stop the SSHD service prior to performing the upgrade:

An error occurred while trying to replace the existing file:
DeleteFile failed; code 5.
Access is denied.

Click Retry to try again, Ignore to skip this file (not recommended), or Abort to cancel installation.

[ More Info ]

[/os/windows/network/ssh/freeSSHd] permanent link

Fri, Jan 20, 2017 10:02 pm

Installing an encryption plugin for UltraVNC

An encryption plugin is available for the UltraVNC open source remote administration/remote desktop software. The SecureVNC Plugin has the following specifications:

[ More Info ]

[/os/windows/software/remote-control/vnc/ultravnc] permanent link

Thu, Jan 19, 2017 11:06 pm

Setting up a Juniper Networks SRX100 Router/Firewall

You can configure a Juniper Networks router/firewall, such as a Dell J-SRX100H, which is manufacturered by Juniper Networks by connecting a network cable between one of the 0/1 through 0/7 ports on the SRX100; don't use the 0/0 port, because that is the default port for the "untrusted" side of the device, i.e., for connections on the "outside" or Internet-facing side of the device. If you have the connected device set to obtain an IP address by the Dynamic Host Configuration Protocol (DHCP), it will be assigned an address from the 192.168.1.1/24 subnet, 192.168.1.2. You can then log into the router by opening a browser window and pointing the browser to http://192.168.1.1.

[ More Info ]

[/security/firewalls/SRX100] permanent link

Wed, Jan 18, 2017 10:46 pm

Allowing inbound connectivity for an application under Windows 8

To permit inbound access to an application through the Microsoft Windows Firewall on a Windows 8 system, you can take the following steps:
  1. Move the mouse pointer to the lower, left-hand corner of the window until you see the Windows Start button appear. When you see it, right-click on it and select Control Panel.
  2. From the Control Panel, select System and Security.
  3. Click on Windows Firewall.
  4. Click on Allow an app or feature through Windows Firewall.
  5. Click on the Change settings button. Once you do so, the "Allow another app" button will no longer be grayed out and you can click on it.
  6. Find the application for which you wish to allow access through the firewall and click on it to highlight and select it.
  7. Click on the Add button. You should then see the program added to the list of apps allowed to communicate through Windows Firewall. By default access is allowed on "private" networks, such as your home or work network. If you also want to allow access on "public" networks, such as you would find at a coffe shop or airport, you can also click the check box for "public".
  8. Click on the OK button. You can then close the Windows Firewall window. You should be able to connect to whatever port or ports the application opens now from another system on the same local area network (LAN).

[ More Info ]

[/os/windows/win8] permanent link

Tue, Jan 17, 2017 10:30 pm

prisoner.iana.org

While using Wireshark to troubleshoot a Domain Name System (DNS) issue for a server that sits behind a firewall that performs Network Address Translation (NAT), I noticed a DNS response coming back where Wireshark showed the following in the "Info" field for a packet:

Standard query response 0x21e1 No such name PTR 5.1.168.192.in-addr.arpa SOA prisoner.iana.org

The server for which I was performing the troubleshooting has an IP address of 192.168.1.5, which is a private IP address. There are 3 private IP address ranges; these ranges are also sometimes referred to as "RFC 1918 addresses", since the private IP address space is defined in RFC 1918 . A Request for Comments (RFC) is a document published by the Internet Engineering Task Force (IETF). Some RFCs, such as RFC 1918 become Internet Standards.

[ More Info ]

[/network/dns] permanent link

Mon, Jan 16, 2017 10:35 pm

Selecting records containing a string in a MySQL or MariaDB database

If you wish to select only the records containing a particular string, e.g., some word, etc., from a MySQL or MariaDB database table then you can use LIKE in the SQL SELECT command. E.g., if I have a table named Books that contains book information and one of the columns in the database is Title, I can select any books from the database where the title contains "Unix" with the command below:

SELECT * FROM Books WHERE Title LIKE "%Unix%";

The percent sign (%) serves as a wildcard character indicating that any number of other charcters will match it. So by putting the percent sign before and after the word Unix, the expression will find any books with titles that have "Unix" anywhere in the title, e.g., at the beginning, middle, or end of the title. If I only wanted to find those records in the Books table where the title began with the word Unix, I could use the command below:

SELECT * FROM Books WHERE Title LIKE "Unix%";

Any characters that came after the word Unix would match, but the title would need to start with "Unix". To find only those books where the word appears at the end of the title, I could use the following command:

SELECT * FROM Books WHERE Title LIKE "%Unix";

If I wanted, instead, to find all of the records where the title doesn't contain the word "Unix", I could put NOT before LIKE.

SELECT * FROM Books WHERE Title NOT LIKE "%Unix%";

[/software/database/mysql] permanent link

Sun, Jan 15, 2017 10:30 pm

Turning on network discovery and file sharing on a Windows 8 system

If you wish to see folders from other Microsoft Windows systems on a local area network (LAN) or those shared from Linux systems via Samba, you may need to turn on network discovery on the Windows system(s) in order to see the shared folder. E.g., if you double-click on Network in the Windows File Explorer and see "Network discovery and file sharing are turned off. Network computers and devices are not visible. Click to change...", click on the message to enable network discovery.

[ More Info ]

[/os/windows/win8] permanent link

Sat, Jan 14, 2017 11:07 pm

Determining or changing the system name for a computer running Windows 8

To determine the system name for a computer running the Microsoft Windows 8 operating system, you can right-click on the Windows Start Button at the lower, left-hand corner of the screen. If you don't see it, hit the Esc key and move the mouse pointer to the lower, left-hand corner of the screen where it should appear. You will see the system's name listed in the "Computer name, domain, and workgroup settings" section. If you want to give the system a new name, click on Change settings and then click on the Change button.

If you want to obtain the information through a command-line interface (CLI) method, instead, you can do so either at a command prompt or PowerShell prompt.

[ More Info ]

[/os/windows/win8] permanent link

Fri, Jan 13, 2017 10:27 pm

Deleting up to a word or back to a word in the Vi or Vim editor

In the vi or Vim text editor, you can delete all characters on a line up to a specified word by placing the cursor on the line at the point where you wish to start the deletion then hit the d key followed by the slash key followed by the word up to which you wish to remove the characters on the line. E.g., suppose you have the following line:

If you can force your heart and nerve and sinew To serve your turn long after they are gone, And so hold on when there is nothing in you Except the Will which says to them: “Hold on”;

From the poem If— by Rudyard Kipling (1865-1936)

If you wished to delete all of the text on the line from the word "To" up until, but not including the word "And" in "And so hold on...", while in command mode, not insert mode, you could move the cursor to the "T" in "To" and then hit the d key followed by the forward slash key (/) and then type And (make sure you use the matching capitalization). The line would then appear as shown below.

If you can force your heart and nerve and sinew And so hold on when there is nothing in you Except the Will which says to them: “Hold on”;

Suppose, instead, you had the cursor at the word "To" as before, but wanted to delete backwards through the word "If", i.e., all the way to the beginning of the line, instead. You could then hit the d key while in command mode, then hit the question mark (?) key and type If. You would then have the text below.

To serve your turn long after they are gone, And so hold on when there is nothing in you Except the Will which says to them: “Hold on”;

For the backwards deletion, the word you type after the question mark is included in the deletion. In this case, if you wished to delete backwards to the beginning of the line, you could also have hit the d key followed by the ? key and then hit the caret (^) key, which represents the beginning of the line. Likewise, you could hit the dollar sign ($) key to delete forward to the end of the line, which it represents, or you could just hit the D key, instead of the lower-case "d" to delete from the current cursor position to the end of the line.

[/software/editors/vi] permanent link

Thu, Jan 12, 2017 10:13 pm

Whitelisting email from a sender or domain using GoDaddy's email service

If you are using Godaddy's email service and email sent from a particular sender isn't showing up in your inbox, check the bulk mail folder, since there is a possibility that the mail was treated as junk email and placed there. To keep email from a particular sender from being subjected to checks that may result in email from that sender going into the bulk mail folder or never appearing in any folder in your account, you can add the sender's email address to a list of whitelisted email addresses, i.e., ones that won't undergo the normal checks to ascertain if the email is email spam, which can sometimes result in false positives, i.e., a legitimate email you would want to receive is mistakenly classified as spam by a software algorithm that checks all incoming email. To whitelist an email address or an entire domain, e.g., all email from any email address at example.com, take the following steps while logged into your GoDaddy email account through the web interface to your email account.

[ More Info ]

[/network/email/godaddy] permanent link

Wed, Jan 11, 2017 10:36 pm

tar extraction errors - Cannot utime: Operation not permitted

I needed to copy the contents of one directory belonging to a user from one Linux system to another. While logged into her account on the source system, I created a tar file, aka a "tarball", of the directory with the command tar -cvf game.tar game to copy the contents of her "game" directory and all of its subdirectories to the tar file. The tar file was about 20 MB in size, so I compressed it with the gzip command gzip game.tar resulting in a game.tar.gz file about 5 MB in size, which I transferred to the destination system. While logged into her account on the destination system, I uncompressed the .gz file with gunzip game.tar.gz and then attempted to extract the contents of the tar file into the same directory on the destination system as on the source system. The directory already existed on the destination server because I had many months ago copied everything in her home directory from the source to the destination system. When I ran the command tar -xvf game.tar to extract the contents of the tar file, I saw files extracted, but I also saw several "Cannot open: File exists" lines in the output from the command, which terminated prematurely with the following lines:

game/Update
tar: game/Update: Cannot open: File exists
game/FAQ
tar: game/FAQ: Cannot open: File exists
game/CONVERT.22
tar: game/CONVERT.22: Cannot open: File exists
game/BETA
tar: game/BETA: Cannot open: File exists
tar: game: Cannot utime: Operation not permitted
tar: Exiting with failure status due to previous errors

[ More Info ]

[/os/unix/commands] permanent link

Tue, Jan 10, 2017 10:47 pm

Determining which version of Windows 10 is installed

There have been various iterations of Microsoft Windows 10 since it was first released. Though you might think of Windows 10 as one version compared to Windows XP, Vista, 7, 8, etc., but there are versions of Windows 10 itself and "builds" within those versions. You can determine which version of Microsoft Windows 10 is installed on a system running Windows 10 by typing winver in the Cortana "Ask me anything" field. You will then see a window, such as the one below, displaying the version and build number of the operating system. In the example shown below from a Dell laptop, the system is running Version 1511 build 10586.713 of the Windows 10 operating system (OS), which is the "November Update" to the OS.

Windows 10 version and build information

[ More Info ]

[/os/windows/win10] permanent link

Mon, Jan 09, 2017 10:32 pm

Thunderbird and Proxy Server Settings

When attempting to check email after installing Mozilla Thunderbird on a Windows 10 system and configuring an email account in Thunderbird, instead of email being downloaded, Thunderbird would show "Connecting to pop3.example.com" and seemed to be indefinitely stuck at that point. When I opened Wireshark to observe the network traffic between the Windows 10 laptop and the email server, I didn't see any traffic whether Thunderbird was configured to use the Post Office Protocol version 3 (POP3) port 110 or the secure version of the protocol POP3S on port 995. I set the Wireshark filter to be tcp.port eq 110 || tcp.port eq 995. I didn't see any traffic between to/from the server when I changed the filter to look for traffic to/from the IP address of the server with ip.addr == xxx.xxx.xxx.xxx where xxx.xxx.xxx.xxx was the IP address of the server. After puzzling over the matter for awhile, it finally dawned on me that I had prevoiusly configured the Microsoft Edge browser to use a SOCKS proxy server via a Secure Shell (SSH) tunnel set up with PuTTY. I had disconnected the PuTTY connection to the SSH server, but hadn't changed the proxy server settings for the system so I realized the was likely the cause of the problem, though I hadn't expected Thunderbird to use the system proxy server setting by default.

[More Info]

[/network/email/clients/thunderbird] permanent link

Sun, Jan 08, 2017 10:50 pm

Altering the contents of a file using sed

On Unix, Linux, and OS X systems, the sed (stream editor) utility can be used to modify the contents of a file replacing one string, i.e., sequence of characters, with another. E.g., suppose the file named myfile contains the following lines:

pink blue
red Blue
orange
blue purple blue
blue

If I want to replace all occurrences of the word "blue" with "green", I could issue the following sed command at a Bash shell prompt.

$ sed -i -e 's/blue/green/g' myfile

[ More Info ]

[/os/unix/commands] permanent link

Sat, Jan 07, 2017 11:12 pm

Day of the week for dates in Excel and Calc

If you wish to display the day of the week, i.e, Monday, Tuesday, Wednesday, etc., that corresponds to a particular date in Microsoft Excel you can simply format the display of the date using a custom format of ddd. E.g., in Microsoft Excel 2013, if I have dates in column A displayed in mm/dd/yyyy format, but I also want the day of the week corresponding to those days to appear in column B as shown below.

Excel 2013 dates with days of the week

[ More Info ]

[/os/windows/office/excel] permanent link

Fri, Jan 06, 2017 8:44 pm

Wireshark showing RST packets when unable to access website

I was unable to access a website on a webserver I frequently access. When I examined the network traffic to and from the server with Wireshark network analyzer software, I could see a repeating sequence of SYN packets from the IP address of the Windows laptop from which I was attempting to access the web server followed immediately by RST, ACK packets from the IP address of the server. That sequence repeated over and over again. E.g.:

130	2.766497	TCP	74	44970?80 [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=1029178963 TSecr=0 WS=16
131	2.768022	TCP	60	80?44970 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
132	2.800200	TCP	74	27779?80 [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=1029178972 TSecr=0 WS=16
133	2.801724	TCP	60	80?27779 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0

[More Info ]

[/network/web/server] permanent link

Thu, Jan 05, 2017 4:02 pm

Email stuck in the sendmail queue

A user repoted that she didn't receive an email someone sent her today. I checked the /var/log/maillog file to see if the mail server, which is running Sendmail, received the email. When I searched on part of the sender's email address, I saw the message had been received by the mail server:

# grep sbear /var/log/maillog
Jan  5 14:08:08 moonpoint sendmail[6276]: v05IxmvR006276: from=<sbearab1@y0hoo.c
om>, size=2339942, class=0, nrcpts=1, msgid=<1226622358.574156.1483642780691@mai
l.y0hoo.com>, proto=ESMTP, daemon=MTA, relay=omp1011.mail.ne1.y0hoo.com [98.138.
87.11]

So I checked Sendmail's queue with the mailq command and saw the message was stuck there. Note: Mailq is identical to sendmail -bp .

# mailq
                        /var/spool/mqueue (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
v05IxmvR006276  2338155 Thu Jan  5 14:08 <sbearab1@y0hoo.com>
                 (host map: lookup (yahoo.com): deferred)
                                         <abad_kitty@moonpoint.com>
                Total requests: 1
#

The sendmail queue can be flushed with the command sendmail -q -v .

#  sendmail -q -v

Running /var/spool/mqueue/v05IxmvR006276 (sequence 1 of 1)
<abad_kitty@moonpoint.com>... aliased to ann
ann... Connecting to local...
ann... Sent
# mailq
/var/spool/mqueue is empty
                Total requests: 0
#

The meaning of the -q and -v options to the sendmail command are shown below:

  -q[time]
              Process saved messages in the queue at given intervals.  If time
              is  omitted,  process the queue once.  Time is given as a tagged
              number, with `s' being seconds, `m' being minutes (default), `h'
              being  hours, `d' being days, and `w' being weeks.  For example,
              `-q1h30m' or `-q90m' would both set  the  timeout  to  one  hour
              thirty  minutes.   By  default,  sendmail  will run in the back-
              ground.  This option can be used safely with -bd.

      -v     Go into verbose mode.  Alias expansions will be announced, etc.

[/network/email/sendmail] permanent link

Wed, Jan 04, 2017 10:32 pm

SSH brute-force break-in attempts from 49.116.40.31

While troubleshooting a problem with a Linux system this evening, I opened Wireshark and noticed a Secure Shell (SSH) packet from an unexpected source address, 49.116.40.31. When I checked the fail2ban log on the system, I noticed that the IP address had been banned temporarily several times today, but break-in attempts resumed whenever the timeout period for the ban expired.

# grep '49.116.40.31' /var/log/fail2ban.log | grep 'Ban\|Unban'
2017-01-04 17:20:46,190 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 17:30:47,135 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 17:31:15,276 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 17:41:16,250 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 17:41:43,390 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 17:51:44,299 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 17:52:14,441 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 18:02:15,243 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 18:02:43,383 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 18:12:44,182 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 18:13:13,323 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 18:23:14,227 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 18:24:23,414 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 18:34:24,183 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 18:35:33,368 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 18:45:34,148 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 18:46:44,331 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 18:56:45,126 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 18:57:14,282 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 19:07:15,124 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 19:07:44,270 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 19:17:45,043 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 19:18:14,190 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 19:28:15,111 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 19:29:23,297 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 19:39:23,304 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 19:39:51,441 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 19:49:52,326 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 19:50:21,472 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 20:00:22,251 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 20:00:49,390 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 20:10:50,192 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 20:11:19,338 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 20:21:20,121 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 20:21:49,263 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 20:31:50,036 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 20:33:38,258 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 20:43:39,059 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
2017-01-04 20:44:37,358 fail2ban.actions        [25142]: NOTICE  [sshd] Ban 49.116.40.31
2017-01-04 20:54:37,372 fail2ban.actions        [25142]: NOTICE  [sshd] UnBan 49.116.40.31
#

[ More Info ]

[/security/attacks/ssh] permanent link

Tue, Jan 03, 2017 10:23 pm

Executing a JavaScript function when a browser window is resized

Sometimes you may want to have a certain event take place if a visitor to your website resizes his or her browser window. With HTML 5, you can use the onresize Event Attribute. You can apply the event attribute to the body tag, e.g.:

<body onresize="someFunction()">

The event that would occur when the browser window is resized will depend upon the code you place in the JavaScript function referenced, which in this case I've named someFunction.

Note: the onresize attribute is new to HTML5 and isn't supported in HTML 4.01 and older versions oF HTML. You can expect current versions of browsers to support it, but if a visitor has an outdated browser version, the function may not work for the visistor.

[ More Info ]

[/network/web/html] permanent link

Mon, Jan 02, 2017 10:42 pm

Determining the program that is connecting to specific IP addresses

While troubleshooting a network issue using the free and open source (FOSS) network analyzer Wireshark, I noticed connections to IP addresses that I thought might be associated with adware sites. The connections were occurring from a Microsoft Windows 10 system. I suspected that the connections were occuring via a browser tab that was open to a website within the K-Meleon web browser, but I wanted to confirm that was the case and then, if it was, to attempt to identify the particular tab open in the browser and the web page that was responsible for the traffic, since there were several tabs open in the browser. There were also other browsers open on the system with multiple windows and tabs, so I might also need to check the tabs open in those browsers.

To see all of the connections to websites on the HTTP port, which is the well-known port 80, I can open a command prompt window and use the netstat command netstat -an and then pipe its output into the find command, looking for ":80". The -a option shows all connections and the -n option converts IP addresses and application layer protocols, such as HTTP, to numeric form.

[ More Info ]

[/os/windows] permanent link

Sun, Jan 01, 2017 8:45 pm

Determining if a directory exists in a Bash script

I have a Bash script that copies the prior day's mail log file from /var/log/maillog.1 to another directory for archiving. The archive directory contains a subdirectory for each year's mail logs. Today is the first day of a new year, so I needed to create a 2017 directory. I could manually create the directory, but I thought I'd modify the Bash script that runs from Cron to check on whether the current year's directory exists and, if it doesn't create it, so, if I forget in future years to create a new year's directory the script will create it for me.

You can check if a directory exists with code similar to what is shown below:

if [ -d "$DIRECTORY" ]; then
  # Insert code to be executed
fi

Or, to check if a directory doesn't exist and execute commands if it doesn't:

if [ ! -d "$DIRECTORY" ]; then
  # Insert code to be executed
fi

Note: putting the $DIRECTORY variable in double quotes allows for cases where the directory name may contain a space. Though that won't be the case for my yearly subdirectories, it is something you can allow for by enclosing the variable name in double quotes.

[ More Info ]

[/os/unix/bash] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo