What's new

Closed Sarili mong ssh tunneling server (tutorial series)

Status
Not open for further replies.

tekninja

Honorary Poster
Joined
Apr 6, 2017
Posts
287
Reaction
885
Points
213
WARNING: This is an Advanced Tutorial. Pabababawin ko as much as possible pero kung dumudugo na talaga ilong mo, andyan si bestfriend google, magpatulong ka. Kung malakas ang loob mong matuto, bilib ako sayo, keep on reading.

UPDATE: My tutorial primarily used VULTR servers (mas madali kasi dun maka free trial) na sa ngayun ay minsan may problem sa accuracy ng bandwidth usage. Kung maencounter mo ito, contact nyo ang support team nila. If it persists, go with DigitalOcean, though need mo ng Credit Card para maka-create ng VPS.

Advanced Tutorials for kaPHC Series
Paano Magkaroon ng Sariling Proxy/SSH/OpenVPN/Shadowsocks Server?

Links muna tayo para sa kararating lang:
Part 1 – Kailangan mo ng VPS (Virtual Private Server)
https://phcorner.net/t/sariling-proxy-ssh-openvpn-shadowsocks-server-tutorial.375615/
Part 2 – Magsimulang mag-install ng Services sa VPS
https://phcorner.net/t/sariling-proxy-ssh-openvpn-shadowsocks-server-tutorial-part-2.375922/

Dedication muna:
Para sa mga idol ko: secretaccount salamat sa tiwala, Futility, kikay001
Lalo na kay boss Draft bilib ako sayo, mahirap bumuhay ng forum
Sa mga Hit-and-Runners thanks for keeping the server hard drives warm, hahaha!
Pero most of all ito ay para sa lahat ng kaPHC na hapit mag-aral para matuto!

Notes:
Uy! Bakit andito ka na agad, haha!
Basa muna ng Part 1 kung wala ka pang idea about VPS (Virtual Private Server).
Basa muna ng Part 2 para bawas sakit ng ulo sa pag install ng Services.


Sarili mong SSH Tunneling Server (Tutorial Series)


1. Ano ang SSH o Secure Shell? Malawakang term ito kapatid, kung ang nasa isip mo lang ay ang host, user, pass and port na ilalagay mo para masulit ang promo mo, mali ka, there is so much more to this. Ang tunneling ay isa lang sa mga powers ni SSH. Okay game isa-isahin natin.

a. Remote Console. Ang primary objective kung bakit may SSH ay para ma-manage mo securely ang server mo mula sa remote location. So every time ka nage-execute ng command sa SSH Client mo it is as-if may monitor ang server mo at nandun ka nage-execute. Note: Kung hindi mo pa nahahalata, lahat ng naunang tutorial about sa pagi-install natin ng services ay na-accomplish natin through SSH Remote Console. Balik tayo, if that is the case na parang andun ka mismo sa server mo nage-excute, then we need also to be cautious dahil (1) Your account is actually a system User Account, and (2) kung dahil sa sobra mong pilantropo pinamigay mo ang Root User Account mo, magpray kana na good boy ang pinag-bigyan mo (at hindi si Crayon Shin-Chan, hahaha! Hoy Carmen, delete ko na account mo ha, mabagal na net saken eh, hahaha!)

WARNING: Let me emphasize and stress this. DON'T SHARE YOUR ROOT ACCOUNT to anybody.
(Well, except sa nililigawan mong nerd, ano nalang naman ang ROOT diba, hindi ka naman halaman o puno, ang need mo HEART nya, hahaha!)

b. Secure File Transfer. Yes you've read it right, may feature sya na magtransfer ng file between server and client. Kung galing ka sa OpenVPN Tutorial, you have experienced this feature.

c. X11 Forwarding. Hindi na siguro ito dapat i-mention pero ang cool kasi nito. Kasi kung may UI ang ira-run mo na program sa ssh console mo, mag pa-pop-up yung UI ng actual program sa screen mo. How cool diba?! Run mo sa ssh console mo "firefox" ng server tapos lalabas sa client pc mo. Google nalang ito ha for more infos para hindi humaba.

d. Secure Tunneling. Ayan na kaPHC! Haha! Ito na paburito mong katambalan ng promo mo. No need to explain na ito.

e. Port Forwarding, Secure Copy, etc. Hindi na ito related masyado sa topic. Pero please google it lalo na kung linux user ka, dapat alam mo ang mga powers na ito.


2. Eto na gawa tayo ng SSH Tunneling Server. Pero konting intro at side notes lang muna. Gusto ko sabihin muna na kapag bumili ka ng VPS mo ay may installed na yan na SSH Service.

Note: Clarification lang po regarding confusions:
"Bakit sa Windows ka nagiinstall, tapos MobaXterm gamit mo, mas ok Linux libre pa."

Hindi tayo nagiinstall ng Proxy/SSH/Shadowsocks/OpenVPN sa MobaXterm. SSH Client ang MobaXterm, gamit natin ito para maka-remote install tayo sa VPS natin. And maraming free features ang MobaXterm, you don't need to buy it. And yes, marunong po ako sa Putty at sa Bitvise, pero ayaw ko na maintimidate mga kaPHC natin na newbie pero willing matuto, honestly ang cool tignan ni MobaXterm, hindi ka matatakot kung baguhan ka. And yes bossing linux masters, I have used linux for 14 years, hindi man ako master pero may alam ako at willing ako i-share sa hindi marunong. Sila po ang target audience ko. Kung may ituturo kayo sa akin well, advanced thank you. I'm an open book, write on me masters! :)

NoLogin Users. Ito ang need mo kung gusto mo ishare ang tunneling powers ng server mo. Para safe ka na hindi nila accidentally makakalikot ng hindi dapat. Easy lang ito kaPHC, wag matakot:

As usual open natin an MobaXterm, start natin ang session ng VPS natin, and Cut/Paste/Hit-Enter all the way lang sa tutorials. First command mga kapatid:
====================================
# adduser [username]
====================================
Ipalit mo sa "[username]" ang username na gusto mo. For this tutorial gagamitin ko ang username na "kaphcuser" kaya ang command na ilalagay ko ay: "adduser kaphcuser" tulad ng nasa screenshot:

1.jpg

Then lagyan natin ng password yung user na nilagay mo, same din ipalit lang ang napili mong name sa user ha.
====================================
# passwd [username]
====================================
Itong example screenshot makikita mo na pinalitan ko ang "[username]" ng "kaphcuser" .

2.jpg

Then add password... Ito ba nakita mo?

3.jpg

Yes po istrikto talaga ito by default. (Eh, bakit sa mga nagbibigay ng free ssh acct for 5-7 days kahit ano pwede? Modified na nila yun, for the sake of simplicity, tyaga ka muna dito ha. Pag linux addict ka na sa future ikaw na mismo ang makakadiskubre nyan. I don't want na ma-spoil ko yung thrill.) From the screenshot: Bawal (1) No Password, (2) Same user and pass, (3) Less than 8 character, and (4) Bawal ang "12345678", "abcdefgh" or any dictionary word. Sige angal ka, ilabas mo sama ng loob mo, tapos ka na? It's for your own safety baby. Hahaha!

Yun oh! Wag mo kalimutan password ha, hehe.

4.jpg

Oops! Wag muna atat, hindi pa yan fully secured. Need natin gawin member si user ng "NOLOGIN" para wala syan access sa Remote Console:
====================================
# usermod -s /sbin/nologin [username]
====================================
You know the drill with the username.

5.jpg

Alright! Time to test kung NOLOGIN na si user.
Close natin ang session, Right-Click sa session shortcut para lumabas ang menu. Then click "Edit session".

6.jpg

Dadalhin tayo ulit sa Session Settings, click natin yung User Icon.

7.jpg

Click "New"

8.jpg

Punan na natin ang fields. Bigyan mo ng Name (sa akin nilagay ko "kaphcnologin"). Then yung Username na ginawa mo kanina, then yung Password mo na hindi mo nakalimutan (sana, hahaha!). Then OK, then OK. Wow! Ok na ok to.

9.jpg

Palitan mo user, then ok ulit:

10.jpg

Ok sige, start na natin session:

11.jpg

Makikita natin na connected sya pero "This account is currently not available." daw. Bakit? Kasi NO-LOGIN nga sa console. Pero wag magalala naka login ka parin sa tunnel.

Congrats! Marunong ka na gumawa ng SSH Tunneling Users. I'm proud of you! Lupet mo chong, lumi-level na si panget! Hahaha!

Sayang dimo naabutan ito:

"TS bakit dika nagtest? I-tunnel mo nga para proof..." Unggoy ka! Ikaw na magprove ah. Hahaha! Alam mo naman, ikaw pa, eh love kita.

HOST:
PORT:
USERNAME:
PASSWORD:

Wow! Si Hit-and-Run, nakadali nanaman ng free, hahaha!

Available yang account na yan til matapos itong series.

Salamat kahit binasa mo lang ito at wala kang kibo dyan... Haha!

Sa mga likers, i like din talaga kita, walang biro! Hahaha!

Sa mga nag-spend ng time mag-comment, you're the reason I spend my time opening a tutorial thread!

Sa mga nagp-PM sa akin ng request, you've been heard wag mag-alala...

As promised eto na ang Complete Series!

PROXY SERVER Tutorial

https://phcorner.net/t/sarili-mong-proxy-server-tutorial-series.376257/

OPENVPN SERVER Tutorial
https://phcorner.net/t/sarili-mong-openvpn-server-tutorial-series.376338/

SHADOWSOCKS SERVER Tutorial
https://phcorner.net/t/sarili-mong-shadowsocks-server-tutorial-series.377223/#post-5528773

BONUS EXTENDED SERIES

TORRENT SERVER Tutorial
Soon!
Give me a few weeks... May Big Project lang at the moment.
Para may idea kayo, and to help narin, i-link ko muna yung isa kong thread:
https://phcorner.net/t/download-tayo-ng-torrent-kahit-blocked-ang-port-hiperdown-style.376897/
 

Attachments

Last edited:
Status
Not open for further replies.

Similar threads

Back
Top