Guest User

How to install and setup Hacktunnel on Ubuntu 16.04[Updated]

a guest
Feb 18th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. How to install and setup Hacktunnel on Ubuntu 16.04
  2.  
  3. 1. First install depencies for hacktunnel
  4.  
  5. sudo apt-get update && sudo apt-get install nodejs build-essential tcl8.5 git golang nano npm screen
  6.  
  7. 1.1 On this part we'll install redis
  8.  
  9. wget http://download.redis.io/releases/redis-stable.tar.gz && tar xzf redis-stable.tar.gz && cd redis-stable
  10. make
  11. make test
  12. sudo make install
  13. cd utils
  14. -----------------------------------------------------
  15. I would just go with the default options on this part:
  16.  
  17. sudo ./install_server.sh
  18.  
  19. -----------------------------------------------------
  20.  
  21. sudo service redis_6379 start
  22.  
  23. To set Redis to automatically start at boot, run:
  24.  
  25. sudo update-rc.d redis_6379 defaults
  26.  
  27. 1.1.1 Securing the redis installation
  28.  
  29. sudo nano /etc/redis/6379.conf
  30.  
  31. ---------------------------------
  32. Find the line that looks like this:
  33.  
  34. # bind 127.0.0.1 ::1
  35.  
  36. And change it to this:
  37.  
  38. bind 127.0.0.1
  39.  
  40. ------------------------------------
  41.  
  42. Scroll to the SECURITY section and look for a commented directive that reads:
  43.  
  44. # requirepass foobared
  45.  
  46. Change it to:
  47.  
  48. requirepass yourveryrandomandstrongpassword
  49.  
  50. Save the file with CTRL + O
  51.  
  52. 1.1.2 Testing redis
  53.  
  54. sudo service redis_6379 restart
  55. redis-cli
  56. auth yourveryrandomandstrongpassword
  57.  
  58. If it says "OK" you can continue.
  59.  
  60. ping
  61.  
  62. If the outcome of "ping" is "pong" then your redis is working.
  63.  
  64. exit
  65.  
  66. 1.2 Setting up GO language development enviroment
  67.  
  68. mkdir ~/.go
  69. echo "GOPATH=$HOME/.go" >> ~/.bashrc
  70. echo "export GOPATH" >> ~/.bashrc
  71. echo "PATH=\$PATH:\$GOPATH/bin # Add GOPATH/bin to PATH for scripting" >> ~/.bashrc
  72. source ~/.bashrc
  73.  
  74.  
  75. 1.2.1 Getting gnatsd
  76.  
  77. go get github.com/nats-io/gnatsd
  78.  
  79. 1.3 Setting up hacktunnel and gnatsd
  80.  
  81. cd ~/
  82. git clone https://github.com/ro31337/hacktunnel && cd hacktunnel
  83. ln -s /usr/bin/nodejs /usr/bin/node
  84. cp nats-server.conf.sample nats-server.conf && nano nats-server.conf
  85. ------------------------------------
  86. Config file will look like this:
  87.  
  88. port: 4242
  89. authorization {
  90. user: foo
  91. password: bar
  92. }
  93.  
  94. Change the user and password to the ones you wish
  95. --------------------------------------------------
  96.  
  97. cp hacktunnel.conf.sample hacktunnel.conf && nano hacktunnel.conf
  98.  
  99. -------------------------------------------------
  100. 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):
  101.  
  102. nats=tcp://username:password@localhost:4242
  103.  
  104. redis-password=password you did set up earlier on redis config file
  105.  
  106. Then save the file
  107.  
  108. -------------------------------------------------
  109.  
  110. gnatsd -c nats-server.conf &
  111. make get-deps
  112. make
  113.  
  114. After this you can run hacktunnel as a background service with this:
  115.  
  116. make run &
  117.  
  118. Congrats!
  119.  
  120. Ps. every time you restart vps or computer you need to do these commands to start hacktunnel again:
  121.  
  122. cd ~/hacktunnel && gnatsd -c nats-server.conf &
  123. make run &
  124.  
  125.  
  126. Guide by onnz423
Add Comment
Please, Sign In to add comment