Edit the regedit file in windows GUI:
Monday, January 14, 2019
Port forward in Mikrotik router
Server local ip is: 192.168.1.200:3999
Command line:
/ip firewall nat
add action=dst-nat chain=dstnat disabled=no dst-port=3999 in-interface=ether1-gateway protocol=tcp to-addresses=192.168.1.200 to-ports=3999
GUI:
Command line:
/ip firewall nat
add action=dst-nat chain=dstnat disabled=no dst-port=3999 in-interface=ether1-gateway protocol=tcp to-addresses=192.168.1.200 to-ports=3999
GUI:
Sunday, January 13, 2019
Disableing Windows 10 update
1. Open the Run command (Win + R), in its type: services.msc and press enter.
2. From the Services list which appears to find the Windows Update service and open it.
2. From the Services list which appears to find the Windows Update service and open it.
Monday, January 7, 2019
LINUX User & groups
Table 3.2. UNIX® Permissions
Symbolic permission
Users and groups stored in /etc/group and /etc/passwd. To print:
# awk -F":" '{print $1}' /etc/passwd
# awk -F":" '{print $1}' /etc/group
Assigning ownership to a particular user of a group:
# chown -R www:www /usr/local/www/apache24/life110volts.com
Give file access permission:
# chmod -R /usr/local/www/apache24/life110volts.com
To see the file list with the permission:
root@freebsd:/ # ls -la /usr/local/www/apache24/life110volts.com
drwxr-xr-x 7 root wheel 512 Dec 30 10:45 ..
Meaning:
-d:file/directory, First:owner, second: group, third:world
Users and Basic Account Management
chown - Unix, Linux Command
Symbolic permission
# awk -F":" '{print $1}' /etc/passwd
# awk -F":" '{print $1}' /etc/group
Assigning ownership to a particular user of a group:
# chown -R www:www /usr/local/www/apache24/life110volts.com
Give file access permission:
# chmod -R /usr/local/www/apache24/life110volts.com
To see the file list with the permission:
root@freebsd:/ # ls -la /usr/local/www/apache24/life110volts.com
drwxr-xr-x 7 root wheel 512 Dec 30 10:45 ..
Meaning:
-d:file/directory, First:owner, second: group, third:world
Users and Basic Account Management
Links: 1, Permissions freeBSD,
FreeBSD: Dependencies not found - PHP modules installation
Error: "Dependencies not found. The following PHP modules are required to use Nextcloud"
To install PHP extentions/dependencies/modules simply run it:
# cd /usr/ports/lang/php73-extensions && make install clean
To find available modules run:
# find /usr/ports -type d -iname "php73-*"
/usr/ports/archivers/php73-bz2
/usr/ports/archivers/php73-phar
/usr/ports/archivers/php73-zip
/usr/ports/archivers/php73-zlib
/usr/ports/converters/php73-iconv
/usr/ports/converters/php73-mbstring
/usr/ports/converters/php73-recode
/usr/ports/databases/php73-dba
/usr/ports/databases/php73-interbase
/usr/ports/databases/php73-mysqli
/usr/ports/databases/php73-odbc
/usr/ports/databases/php73-pdo
/usr/ports/databases/php73-pdo_dblib
/usr/ports/databases/php73-pdo_firebird
/usr/ports/databases/php73-pdo_mysql
/usr/ports/databases/php73-pdo_odbc
/usr/ports/databases/php73-pdo_pgsql
/usr/ports/databases/php73-pdo_sqlite
/usr/ports/databases/php73-pgsql
/usr/ports/databases/php73-sqlite3
/usr/ports/devel/php73-gettext
/usr/ports/devel/php73-intl
/usr/ports/devel/php73-json
/usr/ports/devel/php73-pcntl
/usr/ports/devel/php73-readline
/usr/ports/devel/php73-shmop
/usr/ports/devel/php73-sysvmsg
/usr/ports/devel/php73-sysvsem
/usr/ports/devel/php73-sysvshm
/usr/ports/devel/php73-tokenizer
/usr/ports/ftp/php73-curl
/usr/ports/ftp/php73-ftp
/usr/ports/graphics/php73-exif
/usr/ports/graphics/php73-gd
/usr/ports/lang/php73-extensions
/usr/ports/mail/php73-imap
/usr/ports/math/php73-bcmath
/usr/ports/math/php73-gmp
/usr/ports/misc/php73-calendar
/usr/ports/net-mgmt/php73-snmp
/usr/ports/net/php73-ldap
/usr/ports/net/php73-soap
/usr/ports/net/php73-sockets
/usr/ports/net/php73-xmlrpc
/usr/ports/security/php73-filter
/usr/ports/security/php73-hash
/usr/ports/security/php73-openssl
/usr/ports/security/php73-sodium
/usr/ports/sysutils/php73-fileinfo
/usr/ports/sysutils/php73-posix
/usr/ports/textproc/php73-ctype
/usr/ports/textproc/php73-dom
/usr/ports/textproc/php73-enchant
/usr/ports/textproc/php73-pspell
/usr/ports/textproc/php73-simplexml
/usr/ports/textproc/php73-wddx
/usr/ports/textproc/php73-xml
/usr/ports/textproc/php73-xmlreader
/usr/ports/textproc/php73-xmlwriter
/usr/ports/textproc/php73-xsl
/usr/ports/www/php73-opcache
/usr/ports/www/php73-session
/usr/ports/www/php73-tidy
To install PHP extentions/dependencies/modules simply run it:
# cd /usr/ports/lang/php73-extensions && make install clean
To find available modules run:
# find /usr/ports -type d -iname "php73-*"
/usr/ports/archivers/php73-bz2
/usr/ports/archivers/php73-phar
/usr/ports/archivers/php73-zip
/usr/ports/archivers/php73-zlib
/usr/ports/converters/php73-iconv
/usr/ports/converters/php73-mbstring
/usr/ports/converters/php73-recode
/usr/ports/databases/php73-dba
/usr/ports/databases/php73-interbase
/usr/ports/databases/php73-mysqli
/usr/ports/databases/php73-odbc
/usr/ports/databases/php73-pdo
/usr/ports/databases/php73-pdo_dblib
/usr/ports/databases/php73-pdo_firebird
/usr/ports/databases/php73-pdo_mysql
/usr/ports/databases/php73-pdo_odbc
/usr/ports/databases/php73-pdo_pgsql
/usr/ports/databases/php73-pdo_sqlite
/usr/ports/databases/php73-pgsql
/usr/ports/databases/php73-sqlite3
/usr/ports/devel/php73-gettext
/usr/ports/devel/php73-intl
/usr/ports/devel/php73-json
/usr/ports/devel/php73-pcntl
/usr/ports/devel/php73-readline
/usr/ports/devel/php73-shmop
/usr/ports/devel/php73-sysvmsg
/usr/ports/devel/php73-sysvsem
/usr/ports/devel/php73-sysvshm
/usr/ports/devel/php73-tokenizer
/usr/ports/ftp/php73-curl
/usr/ports/ftp/php73-ftp
/usr/ports/graphics/php73-exif
/usr/ports/graphics/php73-gd
/usr/ports/lang/php73-extensions
/usr/ports/mail/php73-imap
/usr/ports/math/php73-bcmath
/usr/ports/math/php73-gmp
/usr/ports/misc/php73-calendar
/usr/ports/net-mgmt/php73-snmp
/usr/ports/net/php73-ldap
/usr/ports/net/php73-soap
/usr/ports/net/php73-sockets
/usr/ports/net/php73-xmlrpc
/usr/ports/security/php73-filter
/usr/ports/security/php73-hash
/usr/ports/security/php73-openssl
/usr/ports/security/php73-sodium
/usr/ports/sysutils/php73-fileinfo
/usr/ports/sysutils/php73-posix
/usr/ports/textproc/php73-ctype
/usr/ports/textproc/php73-dom
/usr/ports/textproc/php73-enchant
/usr/ports/textproc/php73-pspell
/usr/ports/textproc/php73-simplexml
/usr/ports/textproc/php73-wddx
/usr/ports/textproc/php73-xml
/usr/ports/textproc/php73-xmlreader
/usr/ports/textproc/php73-xmlwriter
/usr/ports/textproc/php73-xsl
/usr/ports/www/php73-opcache
/usr/ports/www/php73-session
/usr/ports/www/php73-tidy
To install any needed dependency you need to cd to the port directory and install it, for example;
# cd /usr/ports/devel/php73-json && make install clean
# cd /usr/ports/archivers/php73-zip && make install clean
# cd /usr/ports/archivers/php73-zlib && make install clean
# cd /usr/ports/ftp/php73-curl && make install clean
# cd /usr/ports/graphics/php73-gd && make install clean
Enable /Disable PHP modules:
Enable /Disable PHP modules: freeBSD
Checking for installed php modules and packages# php -m
Search extension# ee /usr/local/etc/php.ini
To search extension,
# ee /usr/local/etc/php.ini
;extension=mbstring
Remove the semicolon to enable this extention
mbstring configuration starts with:
[mbstring]
In php.ini find this line
;When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
; extension=/path/to/extension/mysqli.so
Search extension# ee /usr/local/etc/php.ini
1.
To enable /disable PHP modules# cd /usr/ports/converters/php73-mbstring && make install clean
# cd /usr/ports/converters/php73-mbstring && make deinstall
To enable /disable PHP modules# cd /usr/ports/converters/php73-mbstring && make install clean
# cd /usr/ports/converters/php73-mbstring && make deinstall
To search extension,
# ee /usr/local/etc/php.ini
;extension=mbstring
Remove the semicolon to enable this extention
mbstring configuration starts with:
[mbstring]
2.
To find the default extension directory:The extention directory location dependes on the OS thus you need to find it manually.
# cat /usr/local/bin/php-config
Find this line.
extension_dir='/usr/local/lib/php/20180731'
Find this line.
extension_dir='/usr/local/lib/php/20180731'
In php.ini find this line
;extension_dir = "./"
Changed it to
Changed it to
extension_dir = "/usr/local/lib/php/20180731/"
;When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
; extension=/path/to/extension/mysqli.so
Simple call to the apachectl command for a graceful restart is needed to load the PHP module:
# apachectl graceful
# apachectl graceful
Or to hard restart,
# service apache24 restart
Saturday, January 5, 2019
Securing your SSH Server
First, check if you can manage to log in with the private key. If you can then it is time to secure your SSH server.
# ee /etc/ssh/sshd_config
To disable the Password authentication.
#ChallengeResponseAuthentication yes
#PasswordAuthentication no
#UsePAM no
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
Restart the SSH daemon and fingers crossed.
# service sshd restart
Check again, if you can manage to log in with the private key.
However, if you don’t plan to use SFTP/SCP to transfer files you should disable it. Do this by commenting out the line that starts with # Subsystem sftp.
Don't forget: Setting up your router port forwarding to 22
Funny mistake: You need to log in from outside network to log in with the public IP!
Link: How to secure your (SSH) server
(Login command)
# scp ~/.ssh/id_rsa.pub user@yourserver.com# ee /etc/ssh/sshd_config
To disable the Password authentication.
#ChallengeResponseAuthentication yes
#PasswordAuthentication no
#UsePAM no
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
Restart the SSH daemon and fingers crossed.
# service sshd restart
Check again, if you can manage to log in with the private key.
However, if you don’t plan to use SFTP/SCP to transfer files you should disable it. Do this by commenting out the line that starts with # Subsystem sftp.
Don't forget: Setting up your router port forwarding to 22
Funny mistake: You need to log in from outside network to log in with the public IP!
Link: How to secure your (SSH) server
Subscribe to:
Posts (Atom)

