Automatically installing Mikbill in Debian 7

For the test, I will perform the automatic installation of Mikbill in Debian 7 and describe the process.

See also my article – How to make a bootable USB flash drive with Debian

Switch directly to the root user:

su -

Download the archive from Mikbill and unpack it:

wget http://www.mikbill.ru/mikbill.tar.gz
tar xzvf mikbill.tar.gz

Run the installation script in Debian 7:

cd DISTR/Debian7x
./install_debian7x

During the installation process, we answer the questions, the IP address of the billing page (where it will be opened), the billing domain, MySQL passwords.

After installing the billing did not open in the browser, there was an error:

502 bad gateway

To solve it, in the text editor opened the configuration:

nano /etc/php5/fpm/pool.d/www.conf

Found the string:

listen = /var/run/php5-fpm.sock

And replaced it with:

listen = /var/run/php-worker-socket

After rebooting the system, everything worked.

Check if Mikbill and radius are working with commands:

netstat -anp|grep 0.0.0.0:2007
netstat -anp|grep 0.0.0.0:1812
netstat -anp|grep 0.0.0.0:1813

The standard login and password to admin panel is admin/admin.
You also need to set the time zone in the system by typing:

dpkg-reconfigure tzdata

And the time zone in billing and /etc/php5/.

Reset password on HikVision cameras and DVRs

On the test, I reset the password on the DVR DS-7204HQHI-SH with the firmware version 3.1.3.
Since to him probably some schoolboy picked up a password, changed it and wrote mucks in the names of the cameras :)

The first step is to download the SADP utility from the official site
https://www.hikvision.com/en/Support/Downloads/Tools

Run the utility, connect the device to the same network as the computer or a direct cable to the computer.
The utility displays the connected device, as well as its serial number, in my case:

DS-7204HQHI-SH0420150505AAWR516895417WCVU

We copy this serial number, removing the model of the device in the beginning, in my case it turned out:

0420150505AAWR516895417WCVU

Open the security key generator, enter this serial number, specify the date that is set on the device and generate the code.

Open SADP again, select the connected device in the list, click on the “Forgot Password” on the right, enter the code, then enter the new password in the “Admin Password” line.
Now you can enter under the admin login and the specified password in the web interface of the device.
If the device was hacked, it is desirable to immediately reset the settings and update the firmware to the latest.

Code generators can be found on the Internet, for example, here are a couple of online generators:
http://hikkvisionpasswordreset.github.io
https://ipcamtalk.com/pages/hikvision-password-reset-tool

Also, the code can be requested from HikVision technical support or the store in which the device was purchased.

See also:
Update firmware on HikVision devices
Reset password in Dahua DVRs

Remote Wake-up of the computer (Wake On LAN)

To remotely turn on the computer, you need to have an ATX power supply, a motherboard with Wake On LAN and BIOS enabled, a Wake On LAN network adapter.

When Wake On LAN is supported, the shut down computer powers the AC adapter that is in low power mode and listens to all packets going to its MAC address without answering them. If a Magic Packet comes, the network adapter sends a signal to turn on the power of the computer.

View active network adapters:

ifconfig

You will need the ethtool package, if it is not installed on the system, you must perform the installation:

sudo apt-get install ethtool

Check for WOL support:

sudo ethtool eth0 | grep Wake

The result of the command if the network card is working with WOL and it is enabled:

Supports Wake-on: g
Wake-on: g

The result of the command when WOL is off:

Wake-on:d

Possible result letters (taken from man ethtool information):

p Wake on PHY activity
u Wake on unicast messages
m Wake on multicast messages
b Wake on broadcast messages
a Wake on ARP
g Wake on MagicPacket™
s Enable SecureOn™ password for MagicPacket™
d Disable (wake on nothing). This option clears all previous options.

To turn on WOL:

sudo ethtool -s интерфейс wol g

Turning on the computer:

apt-get install wakeonlan
wakeonlan -p 50000 00:01:02:03:04:05

-p indicates the UDP port number.

On the Internet, there are also many sites and applications for phones that allow you to send a package to a remote computer.

See also:
Using ethtool

Using ethtool

ethtool – a utility for configuring network interfaces in Linux.

You can install ethtool in Ubuntu / Debian using the command:

sudo apt-get install ethtool

Let’s look at the names of network interfaces:

ifconfig -a

Switch to root, as some commands require elevated privileges:

sudo -i

Example of viewing eth0 settings:

ethtool eth0

Example of viewing information about the network interface driver:

ethtool -i eth0

Viewing Network Interface Statistics:

ethtool -S eth0

View auto-negotiation settings:

ethtool -a eth0

The LED blinks for 3 seconds on the specified network interface:

ethtool -p eth0 3

Network Interface Test:

ethtool -t eth0 online/offline

View the current and maximum size of TX and RX buffers:

ethtool -g eth0

Manual speed setting of 100 Mb Full Duplex on the specified network interface (the specified parameters will be reset after the system restart):

ethtool -s eth0 speed 100 duplex full

Viewing help about ethtool:

ethtool -h

See also:
Configuring the Network in Linux
Changing TX and RX network interface buffers in Linux
Remote Wake-up of the computer (Wake On LAN)