ntopng [Redis.cpp:113] ERROR: to specify a redis server other than the default
ntopng [Redis.cpp:112] ERROR: Please start it and try again or use -r
ntopng [Redis.cpp:111] ERROR: ntopng requires redis server to be up and running
1 Login to pfSense via SSH or console or web GUI
1.1 If using web GUI, navigate to “Diagnostics -> Command Prompt” type following command
rm -rf /var/db/ntopng
2 Now try to start ntopng from Services Status widget
3 The ntopng service should be able to started successfully
The staging environment intermediate certificate (“Fake LE Intermediate X1”) is issued by a root certificate not present in browser/client trust stores. If you wish to modify a test-only client to trust the staging environment for testing purposes you can do so by adding the “Fake LE Root X1” certificate to your testing trust store. Important: Do not add the staging root or intermediate to a trust store that you use for ordinary browsing or other activities, since they are not audited or held to the same standards as our production roots, and so are not safe to use for anything other than testing.
cURL (pronounced ‘curl’) is a computer software project providing a library (libcurl) and command-line tool (curl) for transferring data using various network protocols. The name stands for “Client URL”, It was first released in 1997 . It can be used to transfer (including upload and download) files, emails, web pages etc. Supports more than 20 protocols.
cURL uses HTTP as default protocol to download, e.g. download a web page.
(TLS) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM format. Normally curl is built to use a default file for this, so this option is typically used to alter that default file.
curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is set, and uses the given path as a path to a CA cert bundle. This option overrides that variable.
The windows version of curl will automatically look for a CA certs file named curl-ca-bun-dle.crt, either in the same directory as curl.exe, or in the Current Working Directory, or in any folder along your PATH.
If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module (libnsspem.so) needs to be available for this option to work properly.
(iOS and macOS only) If curl is built against Secure Transport, then this option is supported for backward compatibility with other SSL engines, but it should not be set. If the option is not set, then curl will use the certificates in the system and user Keychain to verify the peer, which is the preferred method of verifying the peer's certificate chain.
(Schannel only) This option is supported for Schannel in Windows 7 or later with libcurl 7.60 or later. This option is supported for backward compatibility with other SSL engines; instead it is recommended to use Windows' store of root certificates (the default for Schannel).
If this option is used several times, the last one will be used.
16 cURL vs Wget
wget is the best to use when we just want to download files from websites. It can be used to download whole website.
If we want to use protocols other than HTTP and HTTPS to upload file, we need to use cURL.
Usually, the home directory is stored under “/home/” e.g. If we have created a user named “Bob” his home directory will be “/home/bob/” Bob will have full control over this folder including Create, Retrieve, Update, Delete (CRUD).
The corresponding folder for Microsoft Windows is usually “C:\Users\bob\”
Check current working directory
Which directory am I working in?
Switch directory/Directory navigation
Switch working directory, navigating through different directory/folders
e.g. Current working directory is “/tmp”, we want to navigate to “/tmp/test/”
Or using the absolute path
List files and folders under a folder
List files and folders under current directory
list files and folders under specific path
Color scheme for “ls” command
Create a new text file
Create a “b.txt” text file under current working directory. File extension like “txt” is not necessary, but it’s easier for users when the extension is present.
Create a new folder
We can also use standard stream redirection to create file and write content to the text file.
ls > ls.txt
The output of “ls” command will be redirected and written to the “ls.txt” file
Copy, Delete, Move/Rename
cp ls.txt ls1.txt
-f: –force ignore nonexistent files and arguments, never prompt
-r, -R: –recursive remove directories and their contents recursively
/*: Anything under root directory (Warning: Use carefully and do not try /* without full backup)
#Delete trash folder and everything within it
rm -rf trash
mv ls.txt ls1.txt
#Under same working directory/folder
mv ls.txt ls1.txt
#With full path
mv /tmp/test/ls.txt /tmp/test/ls1.txt
#Move to another folder with same file name
mv /tmp/test/ls.txt /tmp/ls.txt
#Move to another folder with different file name
mv /tmp/test/ls.txt /tmp/new.txt
Search from root level with “find”
find / -name abc.txt
Search from other specific path with “find”
find /tmp/test -name abc.txt
Search with “locate”
Search from other specific path with “locate”
“find” is usually slower than “locate”
It’s best to do “updatedb” before using “locate”
Search text in file
Search text file (case-sensitive by default)
grep TextWeWantToSearch /tmp/test/textfile.txt
Search test file (ignore case)
grep -i TextWeWantToSearch /tmp/test/textfile.txt
Search all “txt” files under same directory
grep SearchCriteria /tmp/test/*.txt
Add “-n” switch to show line numbers
grep -n SearchCriteria /tmp/test/*.txt
If we want to search sub-directories as well, we need to add “-R” (recursive) parameter
grep -nR SearchCriteria /tmp/test/*
When typing command, e.g. “fin” then hit “Tab” key twice.
If we continue to type “c” at the end, then hit “Enter”, “finecore” will automatically completed.
Same technique can be used for folder names as well. If there is only one folder start with “mus” then after we hit “Tab” key, music will be automatically completed, If there is multiple folder stars with “mus”, then hit “Tab” key twice, options will appear just like for other commands.
Basic File manipulation
Check metadata (Privilege, Size etc.)
Basically the layout has 7 sections
File permissions + No. of hard links + File owner + Group the file belongs + File Size + File modification time + File Name
The 1st character represent file type
Following 9 characters:
r: Read, w: Write, x: Execute -: No privilege
The following group of three characters represent owner’s permission, next group of three characters represent the permission for the group which the user belongs to, last three characters represent privilege for others who is not owner and not the group the file belongs to.
Add “-h” switch together with “-l” to list files and folders with human readable size format
Add “-a” switch to show all files and folders including hidden ones
We can also use stat to find detailed information about a file/folder/directory
Keywords: Linux, Unix, Ubuntu, Kali Linux, Debian, where the program is installed, where the package is installed, program location, software location, package location, package path, program path, software path, installation path, installation location
whereis [options] [-BMS … -f]
Locate the binary, source, and manual-page files for a command.
-b search only for binaries
-B define binaries lookup path
-m search only for manuals and infos
-M define man and info lookup path
-s search only for sources
-S define sources lookup path
-f terminate argument list
-u search for unusual entries
-l output effective lookup paths
-h, --help display this help
-V, --version display version
which apache2 mysql
which which [filename1] [filename2] …
which command in Linux is a command which is used to locate the executable file associated with the given command by searching it in the path environment variable. It has 3 return status as follows:
0 : If all specified commands are found and executable.
1 : If one or more specified commands is nonexistent or not executable.
2 : If an invalid option is specified.