Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IRC and SSL/TLS guide. #106

Merged
merged 1 commit into from
May 15, 2017
Merged

Add IRC and SSL/TLS guide. #106

merged 1 commit into from
May 15, 2017

Conversation

clinew
Copy link
Contributor

@clinew clinew commented May 11, 2017

Please review and let me know whether this is sane or not. I tried to keep it brief, but there's a lot that can go wrong and/or must be omitted for simplicity. #43

Copy link
Member

@pop pop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks @clinew for the PR. Thank you for taking the time to make this doc. Please address my feedback by making changes or letting me know why you don't want to make that change and we should be able to merge this.

datetime: 2017-05-01 00:00:00
---
Although IRC is useful, the default IRC protocol is *unencrypted*, which means
that anyone listening in on the network, such as a black hat sniffing WiFi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd get rid of "such as a black hat sniffing wifi packets in the same coffee shop as us" and instead link to something like the pinapple in your statement listening to your network traffic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to leave "black hat in a coffee shop" as I imagine more people are familiar with that term and scenario than the pineapple, but I'll also link to the WiFi pineapple.

that anyone listening in on the network, such as a black hat sniffing WiFi
packets in the same coffee shop as us, or perhaps an unscrupulous Three-Letter
Agency or Internet Service Provider, is able to read, and possibly modify, the
contents of our messages. In order to defend against this, we can use
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a run-on. Consider breaking it into two separate sentences.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't say "us" or "our" just say "you" or "your". This is for flow, not accuracy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run-on sentences are fine. Academics don't teach you how to write long, complex sentences in order to keep you from thinking complex thoughts[citation needed]. Good catch on the "we".


Background
----------
SSL/TLS is poorly-named; the short story is that SSL (Secure Sockets Layer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SSL/TLS is poorly-named; the short story is that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first thing that anyone will notice when trying to figure out SSL/TLS is why the heck there are two separate names for basically the same thing, and I'd like to provide them a little validation since it's a bit of a headache.

----------
SSL/TLS is poorly-named; the short story is that SSL (Secure Sockets Layer)
refers to a now-obsolete version of the encryption protocol while TLS
(Transport Layer Security) refers to a new version of the protocol. However,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... of the protocol, these separate protocols are sometimes called one name, SSL/TLS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've rarely heard it called "SSL/TLS", usually people just lazily say "SSL", then someone may nitpick whether that person means "TLS" or not. Real headache.

because of the naming kerfuffle, libraries that implement the newer TLS
protocol still use the old SSL in their name, such as in the case of the
OpenSSL library, which is often used for TLS. The encryption protocol will
be referred to in this document as TLS for brevity's sake.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for brevity's sake

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicky, but granted.

The `-ssl_verify` tells `irssi` to verify the server's certificate against the
PKI. Note also that the command uses port 66*9*7 rather than 66*6*7, because
the TLS version of the protocol usually runs on a different port. You should
now be able to connect to Freenode securely!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to an additional external doc which covers connecting to irssi and/or weechat securely. Diversity of docs and technical info is a good thing.

Copy link
Contributor Author

@clinew clinew May 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connecting to irssi and/or weechat securely

You mean using irssi and/or weechat to connect to Freenode securely, right? I think I found the docs for this.

key pair and tell `irssi` where they are. The most obvious place to store these
is in your `irssi` configuration directory, run:

mkdir ~/.irssi/freenode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fence off commands with ``` and pre-pend $ to CLI commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Next, generate the *private* key:

umask 0077
openssl genrsa -out key.pem 4096
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note about this generating a file key.pem and how people can verify it worked (the file exists for instance).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noted that the file exists -- I'm not going to mention how to use 'stat' and 'ls' to find the file, though.

This command will prompt you for metadata about yourself: he only field worth
filling out is the "Common Name" field, for which you should put your IRC
nickname. Now, you can tell `irssi` to use this cert and key when you
connect by running:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify which commands are run in the terminal (shell) and which commands are run in the irssi client. This is a common point of confusion for even intermediate newbies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add some notes, but it should be more clear now that shell commands are prefixed with a '$'.

----------
This has been an extremely brief introduction to using TLS with Freenode IRC.
You should now be able to connect securely to Freenode over TLS, and be able
to identify yourself to NickServ without providing your account password.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some other external 'connecting to irssi / weechat securely' guides / our own guide for connecting to irc in a 'further reading' section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added info on TLS/SSL, X.509, and OpenSSL. SSL/TLS is basically just wrapped around the IRC protocol, and thus most issues occur in the SSL/TLS protocol and have little to do with IRC. I'll add a link to this guide in the "Further Reading" section of the other IRC guide, since this would come after connecting to IRC.

@@ -146,3 +146,4 @@ Now that you know how to get weechat up and running we have another
[irssi]: http://www.irssi.org
[weechat]: http://www.weechat.org
[guide]: http://lug.oregonstate.edu/blog/weechat-intro/
[ssl]: http://lug.oregonstate.edu/blog/irc-and-ssl/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to reference this somewhere in the text, like If you want to set up secure IRC chat, see our [Securing IRC with SSL/TLS guide][ssl]`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clinew Add a reference to the link and I'll merge this.

Thanks again for the contribution! It's a good guide. 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, should be fixed now.

@pop pop merged commit 8797cdf into OSULUG:master May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants