Skip to content
Home » Ubuntu » Page 5

Ubuntu

Visit Tacticalware.com for information related to this tag and others. We look forward to assisting in your tech projects with our in-depth knowledgebase…

Opening Ports on Ubuntu Server 12.04

How to Open Ports Through the Firewall

Originally written for Ubuntu 12.04, not much has changed.  Here are the quick and easy steps to open any port.  For this guide, we will focus on 3306, but you can change that number for any other port number.

In most cases following simple rule opens TCP port 3306:

iptables -A INPUT -i eth0 -p tcp -m tcp – -dport 3306 -j ACCEPT

Port is now open and you are done!

Mining Minex on Ubuntu 18.04 Using EWBF with NVIDIA 1080TI Cards

  • Mining

How To Install and Run EWBF 0.6 for MINEXCOIN on UBUNTU 18.04

login

sudo bash

apt-get update
apt-get dist-upgrade
apt-get install gcc libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev screen

lspci | grep -i nvidia

Check to see if all gpus are listed

apt-get install linux-headers-$(uname -r)

mkdir /miner && mkdir /miner/drivers/ && mkdir /miner/drivers/ewbf && mkdir /miner/drivers/intel && mkdir /miner/drivers/nvidia

add-apt-repository ppa:graphics-drivers/ppa

apt-get update

apt-get install nvidia-driver-410

reboot

nvidia-smi

cd /miner/drivers/ewbf

wget

tar xf EWBF*.gz

cd EW*

nano start.sh

#!/bin/sh
nvidia-smi -pm 1
nvidia-smi -acp 0
nvidia-smi -pl 300
sleep 2
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
./miner –algo 96_5 –server stratum.minexpool.eu –port 3333 –user XaaXTPw4UwL8xnkdStHTCCMRXAWB8Ek1er.tacticalware –pass x –templimit 85 –solver 0 –pec 0

Save, Exit, and then

chmod +x start.sh

screen ./start.sh

Now check your miner periodically to see if it is running, inserting your wallet address in place of my wallet   (XaaXTPw4UwL8xnkdStHTCCMRXAWB8Ek1er):

!miner/XaaXTPw4UwL8xnkdStHTCCMRXAWB8Ek1er

And you are done!

The hardware that I used in this guide:
Gigabyte AORUS GeForce GTX 1080 Ti (QTY 6):
https://amzn.to/2JqvXC8

Motherboard (QTY 1): 
https://amzn.to/2JqGJZ7

CPU (QTY 1): 
https://amzn.to/3qevp2X

Memory (QTY 1): 
https://amzn.to/2JqHn8Z

Hard Drive (QTY 1):  
https://amzn.to/3lic3X5

Risers (QTY 6):  
https://amzn.to/33rIgVE

Power Supplies (QTY 2):
https://amzn.to/3fTRpLR

Add2PSU (QTY 1):
https://amzn.to/39s4URY

Power Switch (QTY 1):  
https://amzn.to/3ljmNVk

Thanks for reading!

Hashcat Build and Benchmarking

Installing, Configuring, and Benchmarking Hashcat on a 6GPU NVIDIA 1080TI Rig

Ubuntu Server 18.04 has been installed, cards connected, and these directions pickup at your very first login

Login

sudo bash

apt-get update && apt-get upgrade

apt-get dist-upgrade

add-apt-repository universe

apt-get install gcc libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev screen

lspci | grep -i nvidia

You should see all of your video cards listed here

apt-get install linux-headers-$(uname -r)

mkdir /installs && mkdir /installs/drivers/ && mkdir /installs/drivers/intel && mkdir /installs/drivers/nvidia && cd /installs/drivers/nvidia

sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt update && apt-get install nvidia-driver-410

reboot

Login

sudo bash

nvidia-smi

You will now see your NVidia cards listed

cd /installs/drivers/nvidia

wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux

mv cuda_10.0.130_410.48_linux cuda_10.0.130_410.48_linux.run

chmod +x cuda_10.0.130_410.48_linux.run

screen sh cuda_10.0.130_410.48_linux.run

Select No to the driver update

Yes to the toolkit install

cd /home/yourusernamegoeshere/ && nano .bashrc

Add this to the end of the file:
# add cuda tools to command path
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-10.0/bin:$PATH

nano /etc/ld.so.conf.d/cuda-10.0-x86_64

Put only one line:
/usr/local/cuda-10.0/lib64

CTRL X to Save and Exit the file

ldconfig

apt-get install hashcat

Now for the OpenCL CPU drivers..I am using an Intel Celeron Processor, so these steps are needed for Hashcat to work properly.  These are not needed for the GPUs

sudo apt-get install ccache flex bison clang-4.0 cmake g++ git patch zlib1g-dev autoconf xutils-dev libtool pkg-config libpciaccess-dev

mkdir -p /installs/drivers/intel-compute-runtime/workspace

cd  /installs/drivers/intel-compute-runtime/workspace

git clone -b release_40 https://github.com/llvm-mirror/clang clang_source

git clone https://github.com/intel/opencl-clang common_clang

git clone https://github.com/intel/llvm-patches llvm_patches

git clone -b release_40 https://github.com/llvm-mirror/llvm llvm_source

git clone https://github.com/intel/gmmlib gmmlib

git clone https://github.com/intel/intel-graphics-compiler igc

git clone https://github.com/KhronosGroup/OpenCL-Headers khronos

git clone https://github.com/intel/compute-runtime neo

ln -s khronos opencl_headers

mkdir -p /installs/drivers/intel-compute-runtime/workspace/build_igc

cd /installs/drivers/intel-compute-runtime/workspace/build_igc

cmake -DIGC_OPTION__OUTPUT_DIR=../igc-install/Release \
-DCMAKE_BUILD_TYPE=Release -DIGC_OPTION__ARCHITECTURE_TARGET=Linux64 \
../igc/IGC

time make -j$(nproc) VERBOSE=1

Now you can generate Debian archives for installation:

time make -j$(nproc) package VERBOSE=1

Install:

sudo dpkg -i *.deb

nano /etc/environment

To the end of the first line (PATH), add the following:

:/usr/local/cuda/bin:/usr/lib/llvm-4.0/bin

Save and Exit

source /etc/environment

mkdir -p /installs/drivers/intel-compute-runtime/workspace/build_icr

cd /installs/drivers/intel-compute-runtime/workspace/build_icr

cmake -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release ../neo

time make -j$(nproc) package VERBOSE=1

sudo dpkg -i *.deb

apt-get install clinfo

clinfo

Now you should see that ICD is installed

And finally you can run

hashcat -b

That’s it!  Thanks for reading!

The hardware that I used in this guide:
Gigabyte AORUS GeForce GTX 1080 Ti (QTY 6):
https://amzn.to/2JqvXC8

Motherboard (QTY 1): 
https://amzn.to/2JqGJZ7

CPU (QTY 1): 
https://amzn.to/3qevp2X

Memory (QTY 1): 
https://amzn.to/2JqHn8Z

Hard Drive (QTY 1):  
https://amzn.to/3lic3X5

Risers (QTY 6):  
https://amzn.to/33rIgVE

Power Supplies (QTY 2):
https://amzn.to/3fTRpLR

Add2PSU (QTY 1):
https://amzn.to/39s4URY

Power Switch (QTY 1):  
https://amzn.to/3ljmNVk

 

Mount USB Drive

How to Mount a USB Drive on Ubuntu Server

Login

sudo bash

fdisk -l

Identify the usb drive by looking for the size/name/etc and then note the path (ex /dev/sdb)

mount /dev/sdb /mnt

cd /mnt

Now you should see your files!

Installing Teamviewer on Ubuntu

Enable Remote Access Through Teamviewer

Quick and dirty guide on how to install Teamviewer so you can remote into your mining rigs from anywhere.

sudo bash

mkdir /home/miner/teamviewer

cd /home/miner/teamviewer

wget https://download.teamviewer.com/download/linux/teamviewer-host_amd64.deb

dpkg -i teamviewer-host_amd64.deb

It will fail and that’s ok because we will fix it here

apt-get -f install

y

After it installs then run

teamviewer setup

Enter your teamviewer username (email@domain.com) and teamviewer password

You are now ready to go.  Try connecting remotely.

Raven Mining on Ubuntu 18.04

Configuring NVidia 1080TI Cards and ccminer on Ubuntu 18.04

This is a Raw guide, assuming that Ubuntu Server 18.04 is already installed.

Login

reboot

Login

sudo bash

add-apt-repository universe

add-apt-repository ppa:graphics-drivers/ppa

apt-get udpate

apt-get -y dist-upgrade

apt-get -y install gcc libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev screen git python-dev freeglut3-dev libx11-dev libgl1-mesa-glx gcc make libcurl4-openssl-dev autoconf libncurses5-dev opencl-headers build-essential protobuf-compiler libprotoc-dev libboost-all-dev libleveldb-dev hdf5-tools libhdf5-serial-dev libopencv-core-dev libopencv-highgui-dev libsnappy-dev libsnappy1v5 libatlas-base-dev cmake libgoogle-glog0v5 libgoogle-glog-dev libgflags-dev liblmdb-dev python-pip gfortran libjansson-dev uthash-dev autogen libtool pkg-config gcc-multilib dkms libxml2-dev libxslt1-dev zlib1g-dev linux-image-extra-virtual libopencv-dev python-numpy libssl-dev automake autotools-dev openssl libssl1.0.0 libssl-dev

reboot

Login

sudo bash

lspci | grep -i NVIDIA

Note NVIDIA has to be capital or no results will show, and now you should see all of your video cards listed here

apt-get install linux-headers-$(uname -r)

mkdir /miner && mkdir /miner/drivers/ && mkdir /miner/drivers/ewbf && mkdir /miner/drivers/intel && mkdir /miner/drivers/nvidia && cd /miner/drivers/nvidia

apt-key adv –fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub

sudo bash -c ‘echo “deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /” > /etc/apt/sources.list.d/cuda.list’

apt update

apt install nvidia-driver-410

wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux

mv cuda_10.0.130_410.48_linux cuda_10.0.130_410.48_linux.run

chmod +x cuda_10.0.130_410.48_linux.run

screen sh cuda_10.0.130_410.48_linux.run

Select No to the driver update

Yes to the toolkit install

cd /home/miner/ && nano .bashrc

Add this to the end of the file:
# add cuda tools to command path
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-10.0/bin:$PATH

nano /etc/ld.so.conf.d/cuda-10.0-x86_64

Put only one line:
/usr/local/cuda-10.0/lib64

CTRL X to Save and Exit the file

ldconfig

cd /miner/drivers

git clone https://github.com/tpruvot/ccminer.git

cd ccminer

nano Makefile.am

Remove comment on line which refers to “61”

CTRL X

Yes

cd /miner/drivers/ccminer

./build.sh

make install

nano Start-Raven.sh

Fill the file with the following:

#!/bin/sh
nvidia-smi -pm 1
nvidia-smi -acp 0
#nvidia-smi -pl 300
sleep 2
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
./ccminer -a x16r -i 20 -o stratum+tcp://us.ravenminer.com:4567 -u RMzHAFgqgjV5qLkajBjLQ325V7HWBpG3d9 -p c=RVN

Save the file

CTRL + X

Y

chmod +x Start-Raven.sh

reboot

Log back in

sudo bash

cd /miner/drivers/ccminer

screen ./Start-Raven.sh

Raven will begin to mine

Opening 7zip files on Ubuntu 18.04

How to Install the 7zip Utility on Ubuntu 18.04

By default you can not download the p7zip-full package from the repo, as it returns the following error:  Package ‘p7zip-full’ has no installation candidate.   To fix this error follow the steps below

From the terminal

sudo bash

add-apt-repository universe

apt install p7zip-full

p7zip -d filename.7z

Thats it!

First Login on Ubuntu 18.04

How To Update the OS During The First Login

Login to the server and run the following commands

sudo bash

apt-get update && apt-get upgrade && apt-get dist-upgrade -y

Install NVidia 1080Ti Drivers on Ubuntu 18.04

NVidia 1080TI Drivers on Ubuntu 18.04

How to guide for installing drivers for the NVidia 1080TI Video Card

sudo bash

echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf

echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf

update-initramfs -u

reboot

Login and then:

sudo bash

dpkg   – -add-architecture i386

apt-get update

apt-get install build-essential libc6:i386 -y

apt-get install pkg-config
apt-get install xorg -y
reboot

Login and then

sudo bash

mkdir /installs && mkdir /installs/drivers && mkdir /installs/drivers/nvidia && cd /installs/drivers/nvidia

Find the drivers from here:
http://www.nvidia.com/Download/index.aspx

Make sure you select the drivers for the Linux 64-bit operating system

Then run
wget and the link that was provided above

Once it is downloaded you will need to run
chmod 755 ./NVI*
./NV*.run

This will begin the installation

Install the 32-bit compatibility libraries

Install and Overwrite with the full version of libglvnd if prompted

Select Yes to run the nvidia-xconfig utility to automatically update your X configuration

Click OK when the installation has completed

reboot

Login as your normal user

Type nvidia-smi to verify all of your adapters show up

That’s it.  Thanks for reading!

The hardware that I used in this guide:
Gigabyte AORUS GeForce GTX 1080 Ti (QTY 6):
https://amzn.to/2JqvXC8

Motherboard (QTY 1): 
https://amzn.to/2JqGJZ7

CPU (QTY 1): 
https://amzn.to/3qevp2X

Memory (QTY 1): 
https://amzn.to/2JqHn8Z

Hard Drive (QTY 1):  
https://amzn.to/3lic3X5

Risers (QTY 6):  
https://amzn.to/33rIgVE

Power Supplies (QTY 2):
https://amzn.to/3fTRpLR

Add2PSU (QTY 1):
https://amzn.to/39s4URY

Power Switch (QTY 1):  
https://amzn.to/3ljmNVk

Installing and Running Hashcat on Ubuntu Server 18.04

Hashcat Installation, Configuration and WPA2 Cracking

Once you have installed Ubuntu Server 18.04 onto your cracking station, you can run the following commands to install and configure hashcat.

sudo bash

apt install ocl-icd-libopencl1 git build-essential

mkdir /installs && mkdir /installs/apps && cd /installs/apps

git clone https://github.com/hashcat/hashcat

cd hashcat

git submodule update –init

make

cd ../

git clone https://github.com/hashcat/hashcat-utils

cd hashcat-utils/src

make

cp *.bin ../bin

Now you want to download your wordlists

mkdir /installs/apps/wordlists && cd /installs/apps/wordlists

wget https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt

Assuming you already have a WPA2 file to crack, you will now need to move the hccapx file to a directory on the cracking system

cd /installs/apps/hashcat

Cracking the WPA2 file with a wordlist:
./hashcat -m 2500 /crack/wpa2/wpa.hccapx /installs/apps/wordlists/rockyou.txt

Cracking with
To crack up to 8 digits :
./hashcat -m 2500 /crack/wpa2/wpa.hccapx -a 3 ?d,?d?d?d?d?d?d?d?d?d?d?d?d?d?d?d?d –increment-min 1 –increment-max 16 –increment

./hashcat -m 2500 -r rules/best64.rule /crack/wpa2/wpa.hccapx /installs/apps/wordlists/rockyou.txt