Posts

Showing posts with the label sudo

https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


Using the ESP-IDF on Linux

Image
The following procedure shows how to use Espressif's Internet-of-Things Development Framework for ESP32 microcontrollers on Debian-based Linux distributions. The ESP-IDF uses the Real-Time Operating System (RTOS) Software Development Kit (SDK). ========== 1. INSTALLATION 1.1. Update package indexes and install the prerequisites. user@host: $ sudo apt-get update user@host: $ sudo apt-get install bison libbison-dev user@host: $ sudo apt-get install cmake user@host: $ sudo apt-get install flex libfl-dev libfl2 user@host: $ sudo apt-get install git user@host: $ sudo apt-get install gperf user@host: $ sudo apt-get install libncurses-dev user@host: $ sudo apt-get install python3 python3-dev python3-pip python3-venv python3-wheel 1.2. Clone the development repository from GitHub. This will download to a directory with the same name. user@host: $ mkdir esp user@host: $ cd esp user@host: $ git clone --recursive https://github.com/espressif/esp-idf.git 1.2.1. For specific releases, clone the...

Using the ESP8266 RTOS SDK on Linux

Image
The following procedure shows how to use Espressif's Real-Time Operating System Software Development Kit for ESP8266 microcontrollers on Debian-based Linux distributions. ========== 1. INSTALLATION 1.1. Update package indexes and install the prerequisites. user@host: $ sudo apt-get update user@host: $ sudo apt-get install bison libbison-dev user@host: $ sudo apt-get install cmake user@host: $ sudo apt-get install flex libfl-dev libfl2 user@host: $ sudo apt-get install git user@host: $ sudo apt-get install gperf user@host: $ sudo apt-get install libncurses-dev user@host: $ sudo apt-get install python3 python3-dev python3-pip python3-venv python3-wheel 1.2. Clone the repository from GitHub. This will download to a directory with the same name. user@host: $ mkdir esp user@host: $ cd esp user@host: $ git clone --recursive https://github.com/espressif/ESP8266_RTOS_SDK.git 1.3. Install the Python packages required by the ESP8266 Internet-of-Things Development Framework. user@host: $ cd E...

Monitoring network traffic with tcpdump

Image
The following procedure demonstrates how to use tcpdump to sniff and log packets going in and out of a machine's network interfaces. ========== 1. Identify the network interfaces available. user@host: $ tcpdump --list-interfaces 1.wlp6s0 [Up, Running] 2.lo [Up, Running, Loopback] 3.any (Pseudo-device that captures on all interfaces) [Up, Running] 4.enp5s0 [Up] 2. Set the sniffing tool to listen on a network interface for packets and send the output to a file for easy review later. 2.1. To and from a target port, such as HTTP, regardless of host. user@host: $ sudo tcpdump -A -i any -l -s 0 -vvv tcp port 80 > mytcpdumpout.txt 2>&1 2.2. To and from a target host, regardless of port. user@host: $  sudo tcpdump -A -i any -l -s 0 -vvv host nameOfMachine > mytcpdumpout.txt 2>&1 2.3. The flags used to adjust the behavior of tcpdump are as follows. [ -A ] prints packets in ASCII format and make them readable, excluding data link layer headers. [ -i any ] c...

Accessing the GlobalProtect VPN via Terminal

Image
The following procedure demonstrates how to connect to the GlobalProtect VPN via command-line terminals. ========== 1. Install openconnect (at least version 8) and dnsmasq. 1.1. Debian-based Linux user@host: $ sudo apt-get update user@host: $ sudo apt-get install openconnect dnsmasq 2. Make a simple shell script to automate the login. #!/bin/sh #BEGIN CODE with the shebang above. user=`whoami`; if [ $user != "root" ]; then echo "sudo required"; exit; fi echo -n "VPN_PASSWORD" | sudo openconnect --protocol=gp --user=VPN_USERNAME --passwd-on-stdin https://VPN_DOMAIN_NAME #END CODE 3. Save the shell script and execute. 3.1. Using the shell command. user@host: $ sh myshellscript.sh 3.2. By itself after changing the mode to executable. user@host: $ chmod +x myshellscript.sh user@host: $ ./myshellscript.sh ==========