Archive

Archives pour la catégorie ‘Sécurité’

Residual-current device

21/06/2017 Comments off
From Wikipedia, the free encyclopedia
 

An RCD does not provide protection against unexpected or dangerously high current (called spikes or surges) when current is flowing in the usual wires in the circuit, therefore it cannot replace a fuse or protect against overheating or fire risk due to overcurrent (overload) or short circuits if the fault does not lead to current leakage. Therefore, RCDs are often used or integrated as a single product along with some kind of circuit breaker, such as a fuse or miniature circuit breaker (MCB), which adds protection in the event of excessive current in the circuit (the resulting RCD with overcurrent protection called an RCBO). RCDs also cannot detect the situation where a human accidentally touches both conductors at the same time, since the flow of current through an expected device, an unexpected route, or a human, are indistinguishable if the current returns through the expected conductor.

RCDs are usually testable and resettable devices. Commonly they include a button that when pressed, safely creates a small leakage condition, and a switch that reconnects the conductors when a fault condition has been cleared. Depending upon their design, some RCDs disconnect both the energized and return conductors upon a fault, while others only disconnect the energized conductor and rely upon the return conductor being at ground (earth) potential. The former are commonly known as « double-pole » designs; the latter as « single-pole » designs. If the fault has left the return wire « floating » or not at its expected ground potential for any reason, then a single-pole RCD will leave this conductor still connected to the circuit when it detects the fault.

[one-third-first]A two-pole, or double-pole, residual-current device. The test button and connect/disconnect switch are colored blue. A fault will trigger the switch to its down (off) position, which in this device would disconnect both conductors.[/one-third-first]
[one-third]

  • Log-log graph of the effect of alternating current I of duration Tpassing from left hand to feet as defined in IEC publication 60479-1.[1]

[/one-third]
[one-third]

1: Electromagnet with help electronics
2: Current transformer secondary winding
3: Transformer core
4: Test push-button
L: Line conductor
N: Neutral conductor

[/one-third]

Lire la suite…

Change the firewall manually to make your Synology more safe!

08/03/2016 Comments off

Source: Changzhou Chen

The default firewall in the Control Panel is so poor because of the poor design of Synology’s firewall policy. You can not use the white list in the global environment if you have both IPv4 or IPv6 network environment. To decrease the risk of being hacked, I’ve decided to change the firewall manually. We should use iptables and ip6tables to change both IPv4 and IPv6 firewall. If you don’t have the need for IPv6 network environment, you can ignore the ip6tables part.

Warning: If you don’t have enough IT experience, you should run the following sections carefully. Maybe you will lose your connection to your Synology and find it hard to connect to it again.

I wrote some IPv4 rules, the following code section is part of the rule file, you can run the iptables-save to export the rule file:

DiskStation> iptables-save > ipv4
# For your simple reference, I delete the
# unuseful part of rule file which exported by iptables-save. The following
# part is completely different from the file exported by iptables-save.
DiskStation> cat ipv4
*filter
:INPUT DROP # Drops all inbound connections that doesn't use the following rules
:FORWARD ACCEPT # It may be default, you can ignore it
:OUTPUT ACCEPT # It may be default, you can ignore it
-A INPUT -i lo -j ACCEPT # Allows all loopback (lo0) traffic
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Accepts all established inbound connections
-A INPUT -s 192.168.1.1/255.255.255.0 -j ACCEPT # Allows your Intranet inbound connections
-A INPUT -s 1.2.3.4 -j ACCEPT # Allows the specified ip address inbound connections
COMMIT

After run the iptables-restore and iptables -L, you can see the following result:

DiskStation> iptables-restore < ipv4
DiskStation> iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
DEFAULT_INPUT  all  --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Chain DEFAULT_INPUT (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.1.0/24       anywhere
ACCEPT     all  --  1.2.3.4              anywhere

Lire la suite…

A Raspberry Pi dashcam with two cameras and a GPS

28/09/2015 Comments off
 

Information on how to set up a Raspberry Pi as a two cameras dashcam with GPS.

General information about the Raspberry Pi dashcam

  What was used and how it’s connected up.

  Installing Arch Linux or Raspbian, resize the SD card, camera configurations etc.

How to wire up the button, LEDs and GPS using the Pi’s GPIO pins
A simple button for shutdown / reboots, status LEDs and an easy to connect GPS.

 

The built-in version

  I decided to try and hide things away and make it automated.
  Current status. What next?

Here are a couple of videos of the dashcam in action…

  
 

Connecting to your Hikvision IP camera

26/05/2015 Comments off

Try the following connection options in iSpy to connect to your Hikvision IP camera. If VLC or FFMPEG options are available we recommend you try those first as they will often be faster and include audio support. If you don’t have VLC installed (or are experiencing problems with the VLC plugin) you may be able to use the same URL under the FFMPEG source type (VLC is based on FFMPEG).

hikvision-domeThe settings for Hikvision cameras are built into our open source project ispy – click « Add » then « IP camera with wizard » to automatically setup your Hikvision cameras. If the camera is not listed in iSpy then click « Get Latest List » when on the add camera wizard. If you need to modify the URL then add or edit the Hikvision camera in iSpy and you can modify the connection type and URL in the video source dialog (button is top of the first tab). Lire la suite…