Archives for posts with tag: unix

Following recent US laws which minimalize the security of social networking sites, I myself am setting up a deepnet server I can use to chat with my friends, and am making a guide on how to set one up. It’s fairly easy and can work with nearly any computer that has a steady internet connection.

1.) Install Linux or BSD

I have a guide on choosing a Linux distro here

you will not need xorg or a desktop manager for this, so unless you plan to use the device for other purposes I would suggest not installing a graphic interface for better security and speed.

2.) Install talk and OpenSSH

for Ubuntu/Debian/Mint: (these should be included, but if not:)

apt-get install openssh

apt-get install talk

for Mandriva/Fedora/OpenSUSE: (these should be included, but if not:)

yum install openssh

yum install talk

for Arch Linux:

pacman -S openssh talk

for others, google how to do it.

3.) Configure ssh

The default settings will work fine, but if you want even more enhanced security read this

Also make sure to log in to your router, and if necessary, your modem, and ensure port 22 is forwarded to the IP of the machine you are configuring this on (this is where 99% of ssh problems come from)

Your modem should forward 22 to your router, then your router should forward 22 to your machine.

4.) Learn to use talk

I unfortunately am not at my server right now and cannot provide screenshots or an in-depth guide on using talk, but it should be simple. For instructions and info on talk, type:

man talk

or

info talk

5.) Configure talk

Again, defaults should be fine, but you can mess with the settings for more security

6.) Connect peers to server with ssh

Make an account for each peer you wish to speak to privately on the machine (useradd on most systems), and have them log in with ssh (ssh -l username@IP)(note this is the IP of your modem, which can be found by typing “IP” into Google)

ssh is a tricky program to figure out for newer users, and I haven’t seen many good guides on it. If you need help, ask on various Linux channels on Freenode (I’ve found #Fedora and #Ubuntu the most helpful)

You can check who is connected with the command “who”

7.) Talk to your peers

the command will be “talk person tty”

on my machine, “who” returns:

[peaceblaster@ArchMobile ~]$ who
peaceblaster :0 2013-04-22 10:55 (:0)
peaceblaster pts/0 2013-04-23 05:10 (:0)
peaceblaster tty2 2013-04-23 05:39

so to message user “peaceblaster”, I would type:

talk peaceblaster tty2

Why this is secure:

Essentially what this does is use very old UNIX components from the 1980s, which were made long before Facebook or Twitter were even possible. Ssh allows secure, encrypted logins from anywhere in the world, which are then used to chat on the server you have set up. By hosting your own server, the only one who has access to any logs is you, so Facebook, Google or any social networking company can’t be forced to give out your information to anyone who pays them enough. Since you use a raw IP instead of a domain, the network is in the “deepnet” or “darknet”, outside of the visible section of the web people call “the internet”.

The other convenient aspect of this setup is that OpenSSH comes with the program “sftp”, which allows equally secure file transfer between machines. The command for sftp is similar to ssh:

sftp username@IP

This will open a shell with which you can send and receive files (there is more on the shell in the man page for sftp)

There you go, secure messaging and filesharing for you and your friends. If you are very paranoid you can look up guides on securing OpenSSH.

P.S.

I noticed most of my readers are not from English-speaking countries, so I have done my best to make this readable. I hope I have done well.

I had a hard time finding a concentrated dose of useful terminal commands, so here you go:

uname -a: determines if you are 32 bit or 64 bit, plus a lot of useful system specs

ls: lists files in current directory

ls -L: lists files in current directory with read/write/execute permissions

chmod 500 -f myFile.txt: changes permissions to file myFile.txt (permissions go from 0 to 7, by row it’s user, other users, the world)

pressing “tab”: will auto-complete if you have timed enough characters- very useful for opening impossibly long-named downloaded software

cd /home/user: change directory to /home/user

cd /: changes to root directory

ifconfig: lists networky stuff

vi or vim: Text-based text editor (I recommend gedit unless you enjoy things like this though)

startx: start GUI (if booted without x server, or logging in remotely with something like ssh)

zypper/yum/apt-get/pacman (depending on distro) are commands you need to get to know, or you will being bugging people to help you install stuff every time you want new software, and it will make them hate you. Don’t be that guy.

can’t think of many more off the top of my head hope these help