- User Conguration
- Preferences
- Windows Settings
- Shortcuts
- New -> Shortcut
- update
- name of the link ( myfolder\mylink )
- file system object
- Desktop
- \\mypath\mylink
Articoli nella categoria News
Create Desktop Shortcuts via GPO
Basic VLAN concepts
Based on HP
You can configure the link type of a port as access, trunk, or hybrid. The link types use the following VLAN tag handling methods:
- Access: an access port can forward packets from only one VLAN and send these packets untagged. An access port can connect a terminal device that does not support VLAN packets or is used in scenarios that do not distinguish VLANs.
- Trunk: a trunk port can forward packets from multiple VLANs. Except packets from the port VLAN ID (PVID), packets sent out of a trunk port are VLAN-tagged. Ports connecting network devices are typically configured as trunk ports.
- Hybrid: a hybrid port can forward packets from multiple VLANs. The tagging status of the packets forwarded by a hybrid port depends on the port configuration. A hybrid port can connect a network device or terminal device that can identify packets tagged with some VLANs.
The PVID identifies the default VLAN of a port. Untagged packets are transmitted through the default VLAN.
When you configure the PVID on a port, follow these guidelines:
- An access or trunk port sends packets from the default VLAN untagged.
- A hybrid port can send packets from the default VLAN tagged or untagged.
- An access port can join only one VLAN. The VLAN to which the access port belongs is the PVID of the port.
- A trunk or hybrid port supports multiple VLANs and the PVID configuration.
Based on Cisco:
Each port or LAG is marked with one of the following modes:
- Access: port belongs to a single untagged VLAN. When a port is in Access mode, the packet types that are accepted on the port (packet type) cannot be designated. It is not possible to enable/disable ingress filtering on an access port.
- Trunk: port can be member of one or more VLANs. It is an untagged member of at most one VLAN, and is a tagged member of all other VLANs of which it is a member.
- General: port can be tagged or untagged and be members of one or more VLAN. (full 802.1Q mode).
For each port or LAG (Link Aggregation Group), select one of the following values:
- Forbidden: port is not able to join the VLAN even if it is was dynamically added using a protocol such as GVRP.
- Excluded: port is not a member of the VLAN. However, the interface can be added to the VLAN through GVRP. This option is not available for the default VLAN.
- Untagged: interface is an untagged VLAN member. Packets forwarded by the interface are untagged.
- Tagged: interface is a tagged member of a VLAN. All packets forwarded by the interface are tagged and contain VLAN information.
For each port or LAG, one or both of the following values may be selected:
- PVID: port PVID is set to this VLAN.
- Multicast TV VLAN: select to make the port a member of the selected VLAN as a Multicast TV VLAN. This option is grayed out for Trunk and General port modes.
Useful Software
- Flashback Recorder: https://www.flashbackrecorder.com/express/
- Record audio and video from desktop or meetings
- Velocity Console: https://www.wavelink.com/Download-Velocity_enterprise-app-modernization-Software/
- Configure Ivanti Terminal Emulation for android devices
- Sysinternals Suite: https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite
- Suite of many useful tools for windows os management
- Rufus: https://rufus.ie/it_IT.html
- Tool for freating bootable USB drives from .ISO files
- Heidi SQL: https://www.heidisql.com/
- Tool to manage MySQL, MariaDB, Postgres, SQL Server databases
- WinSCP: https://winscp.net/eng/download.php
- Connect and manage files through SFTP connctions
- QR Code Studio: https://www.tec-it.com/it/download/free-software/qrcode-studio/Download.aspx
- Generate QR Codes from text
- FreeFileSync: https://freefilesync.org/
- Copy, sync and backup files
HwGroup SMS-GW3
Links:
https://www.hw-group.com/support/how-to-send-sms-via-hwg-sms-gw3
https://www.hw-group.com/accessory/sms-gw3
Methods of sending text messages:
Using netGSM (SOAP – HTTP POST)
Uploading a XML file using cURL
Uploading a XML file using PHP
Sending a SMS from Nagios
Using HTTP GET
Sending a SMS from Nagios
Sending a SMS using Wget
Sending a SMS using cURL
Sending a SMS from PRTG
Using the SNMP Write function
Sending text messages using the netGSM protocol
The netGSM protocol is based on SOAP; that is, sending a XML file using HTTP POST. For a description of the netGSM protocol, see: http://hw-group.us/product-version/netgsm
In a nutshell, HTTP POST is used to send a XML file (service.xml) with the following structure:
GsmOut
SMS
123456789
Hello World!
For a description of individual parameters, see the above-mentioned protocol description.
Uploading a XML file using cURL
cURL is a command-line tool to transfer data using protocols such as HTTP, FTP and more. cURL consists of two parts – the curl.exe console application, and the libcurl.dll library that implements all the curl functions.
The library can be used for writing your own scripts (bindings are available for many languages).
cURL is available free of charge at https://curl.haxx.se/ (https://curl.haxx.se/download.html) however, attention must be paid to choose the correct version to download.
The 32-bit version will not work in a 64-bit Windows environment, even though it starts OK!
cURL is started from the command line with the following command:
curl -X POST -T service.xml 192.168.100.169
where
-X defines the transfer method, in this case POST
-T specifies that a file is uploaded and what is its name (the file must be in the same folder as the curl.exe utility; otherwise, the path must be given)
IP address is the address of HWg-SMS-GW3
If the HWg-SMS-GW3 is secured with a username and a password, the credentials must be specified with the -u parameter:
curl -X POST -T service.xml -u user:pass 192.168.100.169
The response is:
C:\Users\volmr\Desktop\curl>curl -X POST -T service.xml -u user:pass 192.168.100.169
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 375 0 0 0 0 0 0 –:–:– 0:00:01 –:–:– 0
1
169
100 667 100 292 100 375 292 375 0:00:01 0:00:01 –:–:– 657
C:\Users\volmr\Desktop\curl>
Uploading a XML file using PHP
PHP is one of the most popular open source web scripting language. Sending a SMS from your own website is very simple; an example script follows:
GsmOut
“.$type.”
“.$nmr.”
“.$text.”
“;
$fp = @fsockopen($host, $port, $errno, $errstr, 30);
if (!$fp) {
echo “$host:$port: $errstr ($errno)\r\n”;
}
else {
fwrite($fp, “POST /service.xml HTTP/1.0\r\n”);
fwrite($fp, “User-Agent: MyPHPTest\r\n”);
fwrite($fp, sprintf(“Host: %s\r\n”, $host));
fwrite($fp, sprintf(“Authorization: Basic %s\r\n”, base64_encode($user . “:” . $pass)));
fwrite($fp, sprintf(“Content-Length: %d\r\n\r\n”, strlen($xml)));
fwrite($fp, $xml);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
Simply fill out the address, username and password for your HWg-SMS-GW3 and everything works right away. The $type, $nmr and $text variables can be of course passed from other scripts.
Sending a SMS from Nagios
Nagios uses scripts written in Perl. The Netways company from Germany has provided the notify-poseidon-sms.pl script that can send up to 160 characters with this command:
./notify-poseidon-sms.pl -H 192.0.2.10 -M “Test message” -D 123456789
where:
-H – (Host) IP address of HWg-SMS-GW3
-M – (Message) message text
-D – (Destination) recipient’s telephone number
A limitation is that the script can only send SMS and cannot ring the recipient’s phone number; however, this can be easily changed, see e.g. notify-poseidon-call.pl (see the attachments). Also, it does not support http authentication.
Example of use in Windows:
C:\Users\volmr\Desktop\curl>perl notify-poseidon-sms.pl -H 192.168.100.169 -M “Hello World!” -D 777232759
OK, message sent with ID 1 to ‘777232759’
C:\Users\volmr\Desktop\curl>
Sending text messages using HTTP GET
HTTP GET is a method where all parameters are passed directly in the URL. This method is often used for simple applications because it allows for simple debugging and is easy to code. One simply invokes the address with the necessary parameters:
values.xml?Cmd=SMS&Nmr=00420123456789&Text=Hello World!
where:
Values.xml – file in the GW that the command should process. It is either values.xml or service.xml
Cmd – command that instructs what the GW should do: SMS – send a text message, CALL – ring the number
Nmr – phone number in national or international format. It is recommended to use 00 instead of the “+” sign so that there is no need to replace the “+” with an entity
Text – message text encoded in UTF-8
A disadvantage is that the HTTP GET method, natively used to display WWW pages, is difficult to secure against misuse (one would need to set WWW Security, which then prevents unrestricted browsing of the HWg-SMS-GW3 web interface).
And even then, the login credentials are sent in the URL in the open:
http://user:pass@192.168.1.1/values.xml?Cmd=SMS&Nmr=777232759&Text=Hello 20World!
For these reasons, the sending of messages via HTTP GET is disabled by default, and must be manually enabled at the GSM Modem tab if it is needed:
Sending a SMS from a web browser
Enter the URL of HWg-SMS-GW3 including the requested commands into the address field of the web browser:
http://192.168.100.169/values.xml?Cmd=SMS&Nmr=777232759&Text=Hello World!
After sending, a XML confirmation appears:
1
2
Sending SMS using Wget
GNU Wget is a command-line utility that serves as a simple but powerful http client. It implements file transfer over HTTP, HTTPS and FTP protocols. It is available at https://www.gnu.org/software/wget/ and Windows versions are available at http://gnuwin32.sourceforge.net/packages/wget.htm
Wget is very simple to use – simply enter the same command that would be entered in the browser address field. However, the entire URL must be enclosed in double quotes:
wget “http://192.168.100.169/values.xml?Cmd=SMS&Nmr=777232759&Text=Hello World!”
The result looks like this:
C:\Users\volmr\Desktop\wget>wget “http://192.168.100.169/values.xml?Cmd=SMS&Nmr=777232759&Text=Hello World!”
–2017-12-28 15:56:35– http://192.168.100.169/values.xml?Cmd=SMS&Nmr=777232759&Text=Hello%20World!
Connecting to 192.168.100.169:80… connected.
HTTP request sent, awaiting response… 200 Ok
Length: unspecified [text/xml]
Saving to: ‘values.xml@Cmd=SMS&Nmr=777232759&Text=Hello%20World!.1’
values.xml@Cmd=SMS&Nmr=777232 [ <=> ] 118 –.-KB/s in 0s
2017-12-28 15:56:35 (5.48 MB/s) – ‘values.xml@Cmd=SMS&Nmr=777232759&Text=Hello%20World!.1’ saved [118]
C:\Users\volmr\Desktop\wget>
Sending SMS using cURL
The cURL utility is used in the same way as the wget utility. This is the command:
curl “http://192.168.100.169/values.xml?Cmd=SMS&Nmr=777232759&Text=Hello World!”
And this is the application’s response:
C:\Users\volmr\Desktop\curl>curl “http://192.168.100.169/values.xml?Cmd=SMS&Nmr=777232759&Text=Hello World!”
1
4
C:\Users\volmr\Desktop\curl>
Of course, the main result is that the message is sent.
Sending a SMS from PRTG
PRTG Network Monitor is a complex network monitoring solution that combines Paessler’s expertise with a complete set of monitoring functions, intuitive and easy-to-use UI and the most advanced monitoring tool suitable for all types of networks.
PRTG Network Monitor can send text messages using the HTTP GET method. The setting up only involves specifying a URL for sending the messages.
This is done with the Enterprise Console (application or WWW interface) in Setup > System Administration > Notification Delivery. The Custom URL field should contain:
http://IP_adresa/values.xml?Cmd=SMS&Nmr=%SMSNUMBER&Text=%SMSTEXT
This ensures that the SMSNUMBER and SMSTEXT system variables are inserted at the correct places in the URL.
PRTG currently does not support security using username and password!
Sending a SMS using the SNMP Write function (snmpset)
Starting from firmware version 1.1.3, HWg-SMS-GW3 supports the sending of SMS and dialing of numbers using SNMP. SNMP write, or more exactly SNMP SET function, is used for that purpose.
However, it is necessary to write all the 3 required OIDs for the recipient’s number, message text and function (SMS/ring/SMS+ring). The OIDs are the following:
msgQueueNmr (OID .1.3.6.1.4.1.21796.4.10.2.2.0) – (mandatory) Recipient’s phone number in national or international format. The international format can use either “+” or “00”.
msgQueueCmd (OID .1.3.6.1.4.1.21796.4.10.2.3.0) – (mandatory) Action: 1=sms, 2=ring, 3=sms+ring
msgQueueText (OID .1.3.6.1.4.1.21796.4.10.2.1.0) – (mandatory) Message text. Can be omitted if the requested action is ring only.
In a concrete example, the individual commands could look like this:
snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.2.0 i: 777232759
snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.1.0 s “Hello World!”
snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.3.0 i: 1
When the commands are entered in the command line, the following appears:
C:\usr\bin>snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.2.0 i: 777232759
SNMPv2-SMI::enterprises.21796.4.10.2.2.0 = INTEGER: 777232759
C:\usr\bin>snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.1.0 s “Hello World!”
SNMPv2-SMI::enterprises.21796.4.10.2.1.0 = STRING: “Hello World!”
C:\usr\bin>snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.3.0 i: 1
SNMPv2-SMI::enterprises.21796.4.10.2.3.0 = INTEGER: 1
C:\usr\bin>
The command to ring the number then looks like this:
snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.2.0 i: 777232759
snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.3.0 i: 2
and the response:
C:\usr\bin>snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.2.0 i: 777232759
SNMPv2-SMI::enterprises.21796.4.10.2.2.0 = INTEGER: 777232759
C:\usr\bin>snmpset -v 1 -c private 192.168.100.169 1.3.6.1.4.1.21796.4.10.2.3.0 i: 2
SNMPv2-SMI::enterprises.21796.4.10.2.3.0 = INTEGER: 2
C:\usr\bin>
How to use PDO with PHP and MySQL
$db = new PDO('mysql:host=localhost;dbname=mydb;', 'username', 'password'); $q="select my query"; $db->query($q);
How to use fgetcsv in PHP
$i=0; if (($handle = fopen("myfile.csv", "r")) !== FALSE) { while (($cells = fgetcsv($handle, 1000, ",")) !== FALSE) { if ($i==0){// header }else{ //content } $i++; } fclose($handle); }
VSFTPD Error 500 OOPS
insert
allow_writeable_chroot=YES
into:
/etc/vsftpd/vsftpd.conf
Execute a PHP script from another PHP script
hello.php
Command line: php hello.php
include('hello.php');
$output = shell_exec('php hello.php');
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.myDomain.com/hello.php"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) $output = curl_exec($ch); curl_close($ch); echo $output;
Recent Comments