Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to install and setup Hacktunnel on Ubuntu 16.04
- 1. First install depencies for hacktunnel
- sudo apt-get update && sudo apt-get install nodejs build-essential tcl8.5 git golang nano npm screen
- 1.1 On this part we'll install redis
- wget http://download.redis.io/releases/redis-stable.tar.gz && tar xzf redis-stable.tar.gz && cd redis-stable
- make
- make test
- sudo make install
- cd utils
- -----------------------------------------------------
- I would just go with the default options on this part:
- sudo ./install_server.sh
- -----------------------------------------------------
- sudo service redis_6379 start
- To set Redis to automatically start at boot, run:
- sudo update-rc.d redis_6379 defaults
- 1.1.1 Securing the redis installation
- sudo nano /etc/redis/6379.conf
- ---------------------------------
- Find the line that looks like this:
- # bind 127.0.0.1 ::1
- And change it to this:
- bind 127.0.0.1
- ------------------------------------
- Scroll to the SECURITY section and look for a commented directive that reads:
- # requirepass foobared
- Change it to:
- requirepass yourveryrandomandstrongpassword
- Save the file with CTRL + O
- 1.1.2 Testing redis
- sudo service redis_6379 restart
- redis-cli
- auth yourveryrandomandstrongpassword
- If it says "OK" you can continue.
- ping
- If the outcome of "ping" is "pong" then your redis is working.
- exit
- 1.2 Setting up GO language development enviroment
- mkdir ~/.go
- echo "GOPATH=$HOME/.go" >> ~/.bashrc
- echo "export GOPATH" >> ~/.bashrc
- echo "PATH=\$PATH:\$GOPATH/bin # Add GOPATH/bin to PATH for scripting" >> ~/.bashrc
- source ~/.bashrc
- 1.2.1 Getting gnatsd
- go get github.com/nats-io/gnatsd
- 1.3 Setting up hacktunnel and gnatsd
- cd ~/
- git clone https://github.com/ro31337/hacktunnel && cd hacktunnel
- ln -s /usr/bin/nodejs /usr/bin/node
- cp nats-server.conf.sample nats-server.conf && nano nats-server.conf
- ------------------------------------
- Config file will look like this:
- port: 4242
- authorization {
- user: foo
- password: bar
- }
- Change the user and password to the ones you wish
- --------------------------------------------------
- cp hacktunnel.conf.sample hacktunnel.conf && nano hacktunnel.conf
- -------------------------------------------------
- edit following lines to following values (on the "nats=" part, use the same password and username as you have setted up on nats-server.conf):
- nats=tcp://username:password@localhost:4242
- redis-password=password you did set up earlier on redis config file
- Then save the file
- -------------------------------------------------
- gnatsd -c nats-server.conf &
- make get-deps
- make
- After this you can run hacktunnel as a background service with this:
- make run &
- Congrats!
- Ps. every time you restart vps or computer you need to do these commands to start hacktunnel again:
- cd ~/hacktunnel && gnatsd -c nats-server.conf &
- make run &
- Guide by onnz423
Add Comment
Please, Sign In to add comment