Blame
Date:
Fri Apr 1 04:00:22 2022
UTC
Message:
Daily backup
02
2022-02-15
agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
11
2022-02-15
text=(:title Troubleshooting with netcat:)%0a%0anetcat is the swiss-army knife of networking. It is an extremely valuable tool to help diagnose any networking errors. You can and should use it often when working on sysadmin and writing code.%0a%0aopenssl s_client provides the same functionality but for encrypted connections.%0a%0a!! IPv4 Connections%0aTo test if you are able to establish an IRC connection, you can use netcat or openssl for encrypted connections:%0a%0a!!! openssl%0a[@%0a$ openssl s_client -connect irc.ircnow.org:6697%0a@]%0a%0aYou will be presented with details from the certificate verification before coming to a blank line if the connection was successful. This is your prompt for beginning the Connection Registration step below.%0a%0a!!! netcat%0a[@%0a$ nc irc.ircnow.org 6667%0a@]%0a%0aYou will be presented with a blank line if the connection was successful. This is your prompt for the Connection Registration step below.%0a%0a!!! Connection Registration%0a%0aOnce connected, you need to identify yourself by typing the following. If you have a password for your connection, it should be entered before the NICK/USER commands. %0a%0a[@%0aPASS newuser/ircnow:password%0a@]%0a%0a%0a[@%0aNICK newnick%0aUSER newuser * * :newuser%0a@]%0a%0aYou may be challenged with a PING, which you must respond to with a PONG followed by the token received in the PING.%0a%0a[@%0aPING: 12345%0aPONG: 12345%0a@]%0a%0a'''WARNING''': Do not ever connect to IRC as root. Some networks will gline your entire IP address if you attempt to connect as root because you will appear to be a drone.%0a%0aIf you successfully see the message of the day (MOTD) and other replies from the IRC server, then the IRC connection has succeeded.%0a%0a!! IPv6 Connections%0a!!! openssl%0a%0a[@%0a$ openssl s_client -6 -connect irc.ircnow.org:6697%0a@]%0a%0a!!! netcat%0aYou can specifically use netcat to test if an IPv6 address is working:%0a%0a[@%0a$ nc -s 2001:0db8:: ipv6.ircnow.org 6667%0a@]%0a%0aThis will cause netcat to bind to the IPv6 address 2001:0db8::. If you configured the IPv6 address 2001:0db8:: correctly, you should be able to see the MOTD.%0a%0aYou should see something like the following from the server's reply:%0a%0a[@%0a:irc.example.ircnow.org 396 newnick 2001:0db8:20:b4:f117:2f18:11eb:3a85 :is your displayed hostname now%0a:newnick!newnick@2001:0db8:20:b4:f117:2f18:11eb:3a85 MODE newnick :+iC%0a@]%0a%0aIn this case, the vhost is not a nice hostname, which means that either your rDNS or DNS AAAA record is not configured properly. When done properly, you should see something like:%0a%0a[@%0a:irc.example.ircnow.org 396 newnick newnick.example.ircnow.org :is your displayed hostname now%0a:newnick!newnick@newnick.example.ircnow.org MODE newnick :+iC%0a@]%0a%0aTo check your vhost, type @@WHOIS newnick@@:%0a%0a[@%0aWHOIS newnick%0a:irc.example.ircnow.org 311 newnick newnick newnick 2001:0db8:: * :newuser%0a:irc.example.ircnow.org 312 newnick newnick irc.example.ircnow.org :irc.example.ircnow.org%0a:irc.example.ircnow.org 378 newnick newnick :is connecting from *@2001:0db8::%0a:irc.example.ircnow.org 379 newnick newnick :is using modes +iC%0a:irc.example.ircnow.org 317 newnick newnick 15 1597224116 :seconds idle, signon time%0a:irc.example.ircnow.org 318 newnick newnick :End of WHOIS list%0a@]%0a%0aIn this above example, the vhost is not showing up properly. If it shows up properly, you should see something like this:%0a%0a[@%0a:irc.example.ircnow.org 311 newnick newnick newnick newnick.example.ircnow.org * :newnick%0a:irc.example.ircnow.org 312 newnick newnick irc.example.ircnow.org :irc.example.ircnow.org%0a:irc.example.ircnow.org 378 newnick newnick :is connecting from *@newnick.example.ircnow.org 2001:0db8:20:b4:f8fb:b8fa:9812:2562%0a:irc.example.ircnow.org 379 newnick newnick :is using modes +iC%0a:irc.example.ircnow.org 317 newnick newnick 86 1597224404 :seconds idle, signon time%0a:irc.example.ircnow.org 318 newnick newnick :End of WHOIS list%0a@]%0a!! Joining and Parting Channels%0a%0aTo join a channel:%0a%0a[@%0aJOIN #ircnow%0a@]%0a%0aTo part a channel:%0a%0a[@%0aPART #ircnow%0a@]%0a%0a!!! Sending Messages%0aTo send a message to a channel or user:%0a%0a[@%0aPRIVMSG #ircnow :Hello, world!%0aPRIVMSG Mom :Look ma, no client!%0a@]%0a%0a!!! NickServ%0aTo identify with NickServ:%0a%0a[@%0aPRIVMSG Nickserv :identify PASSWORD%0a@]%0a!! Quiting%0aTo quit, just type CTRL+C.
19
2022-02-15
csum:1644860202=Corrected order of commands and added description for USER params.
20
2022-02-15
diff:1644860202:1644855201:=26,27c26,27%0a%3c Once connected, you need to identify yourself by typing the following. If you have a password for your connection, it should be entered before the NICK/USER commands. %0a%3c %0a---%0a> Once connected, you need to identify yourself by typing the following. %0a> %0a29c29,30%0a%3c PASS newuser/ircnow:password%0a---%0a> NICK newnick%0a> USER newuser * * :newuser%0a32c33,34%0a%3c %0a---%0a> You may be prompted for a password, or just be expected to provide one which you can answer like this:%0a> %0a34,35c36%0a%3c NICK newnick%0a%3c USER newuser * * :newuser%0a---%0a> PASS newuser/ircnow:password%0a38c39%0a%3c You may be challenged with a PING, which you must respond to with a PONG followed by the token received in the PING.%0a---%0a> You may be challenged with a PING, which you must respond to with a PONG matching the PING they sent.%0a
23
2022-02-15
diff:1644855201:1644855137:=54c54%0a%3c $ openssl s_client -6 -connect irc.ircnow.org:6697%0a---%0a> openssl s_client -6 -connect irc.ircnow.org:6697%0a
26
2022-02-15
diff:1644855137:1644854822:=69c69,70%0a%3c :irc.example.ircnow.org 396 newnick 2001:0db8:20:b4:f117:2f18:11eb:3a85 :is your displayed hostname now%0a---%0a> :irc.example.ircnow.org 396 newnick 2001:0db8:20:b4:f117:2f18:11eb:3a85 :is your displayed h%0a> ostname now%0a
32
2022-02-15
diff:1644854787:1644854038:=52,55d51%0a%3c %0a%3c [@%0a%3c openssl s_client -6 -connect irc.ircnow.org:6697%0a%3c @]%0a
35
2022-02-15
diff:1644854038:1644853663:=4,5d3%0a%3c %0a%3c openssl s_client provides the same functionality but for encrypted connections.%0a
41
2022-02-15
diff:1644853662:1644853173:=5c5%0a%3c !! IPv4 Connections%0a---%0a> !! Debugging IRC%0a
44
2022-02-15
diff:1644853173:1644852857:=97,98c97%0a%3c !! Joining and Parting Channels%0a%3c %0a---%0a> %0a111d109%0a%3c !!! Sending Messages%0a119d116%0a%3c !!! NickServ%0a125c122%0a%3c !!! Quiting%0a---%0a> %0a
47
2022-02-15
diff:1644852857:1644852218:=48,51d47%0a%3c !! IPv6 Connections%0a%3c !!! openssl%0a%3c %0a%3c !!! netcat%0a55a52,55%0a> NICK newnick%0a> USER newuser * * :newuser%0a> PING :12345%0a> PONG :12345%0a
50
2022-02-15
diff:1644852218:1644831143:=13,14c13%0a%3c You will be presented with details from the certificate verification before coming to a blank line if the connection was successful. This is your prompt for beginning the Connection Registration step below.%0a%3c %0a---%0a> You will be presented with details from the certificate verification before coming to a blank line if the connection was successful. This is your prompt for beginning the IRC protocol steps below.%0a20,21c19,20%0a%3c You will be presented with a blank line if the connection was successful. This is your prompt for the Connection Registration step below.%0a%3c %0a---%0a> You will be presented with a blank line if the connection was successful. This is your prompt for the IRC protocol commands bellow.%0a> %0a24c23%0a%3c Once connected, you need to identify yourself by typing the following. %0a---%0a> Once connected, you need to identify yourself by typing%0a
54
2022-02-15
diff:1644831143:1644830791:minor=21,22c21,22%0a%3c !!! Connection Registration%0a%3c %0a---%0a> !!! IRC %0a> %0a30c30%0a%3c You may be prompted for a password, or just be expected to provide one which you can answer like this:%0a---%0a> You may be prompted for a password which you can answer like this:%0a
58
2022-02-15
diff:1644830791:1614941891:=6,8c6,8%0a%3c To test if you are able to establish an IRC connection, you can use netcat or openssl for encrypted connections:%0a%3c %0a%3c !!! openssl%0a---%0a> %0a> To test if you are able to establish an IRC connection, you can use netcat:%0a> %0a10,15d9%0a%3c $ openssl s_client -connect irc.ircnow.org:6697%0a%3c @]%0a%3c %0a%3c You will be presented with details from the certificate verification before coming to a blank line if the connection was successful. This is your prompt for beginning the IRC protocol steps below.%0a%3c !!! netcat%0a%3c [@%0a17,25d10%0a%3c @]%0a%3c %0a%3c You will be presented with a blank line if the connection was successful. This is your prompt for the IRC protocol commands bellow.%0a%3c %0a%3c !!! IRC %0a%3c %0a%3c Once connected, you need to identify yourself by typing%0a%3c %0a%3c [@%0a28,38d12%0a%3c @]%0a%3c %0a%3c You may be prompted for a password which you can answer like this:%0a%3c %0a%3c [@%0a%3c PASS newuser/ircnow:password%0a%3c @]%0a%3c %0a%3c You may be challenged with a PING, which you must respond to with a PONG matching the PING they sent.%0a%3c %0a%3c [@%0a
61
2021-12-17
diff:1614941891:1614941891:=1,96d0%0a%3c (:title Troubleshooting with netcat:)%0a%3c %0a%3c netcat is the swiss-army knife of networking. It is an extremely valuable tool to help diagnose any networking errors. You can and should use it often when working on sysadmin and writing code.%0a%3c %0a%3c !! Debugging IRC%0a%3c %0a%3c To test if you are able to establish an IRC connection, you can use netcat:%0a%3c %0a%3c [@%0a%3c $ nc irc.ircnow.org 6667%0a%3c NICK newnick%0a%3c USER newuser * * :newuser%0a%3c PING: 12345%0a%3c PONG: 12345%0a%3c @]%0a%3c %0a%3c '''WARNING''': Do not ever connect to IRC as root. Some networks will gline your entire IP address if you attempt to connect as root because you will appear to be a drone.%0a%3c %0a%3c If you successfully see the message of the day (MOTD) and other replies from the IRC server, then the IRC connection has succeeded.%0a%3c %0a%3c You can specifically use netcat to test if an IPv6 address is working:%0a%3c %0a%3c [@%0a%3c $ nc -s 2001:0db8:: ipv6.ircnow.org 6667%0a%3c NICK newnick%0a%3c USER newuser * * :newuser%0a%3c PING :12345%0a%3c PONG :12345%0a%3c @]%0a%3c %0a%3c This will cause netcat to bind to the IPv6 address 2001:0db8::. If you configured the IPv6 address 2001:0db8:: correctly, you should be able to see the MOTD.%0a%3c %0a%3c You should see something like the following from the server's reply:%0a%3c %0a%3c [@%0a%3c :irc.example.ircnow.org 396 newnick 2001:0db8:20:b4:f117:2f18:11eb:3a85 :is your displayed h%0a%3c ostname now%0a%3c :newnick!newnick@2001:0db8:20:b4:f117:2f18:11eb:3a85 MODE newnick :+iC%0a%3c @]%0a%3c %0a%3c In this case, the vhost is not a nice hostname, which means that either your rDNS or DNS AAAA record is not configured properly. When done properly, you should see something like:%0a%3c %0a%3c [@%0a%3c :irc.example.ircnow.org 396 newnick newnick.example.ircnow.org :is your displayed hostname now%0a%3c :newnick!newnick@newnick.example.ircnow.org MODE newnick :+iC%0a%3c @]%0a%3c %0a%3c To check your vhost, type @@WHOIS newnick@@:%0a%3c %0a%3c [@%0a%3c WHOIS newnick%0a%3c :irc.example.ircnow.org 311 newnick newnick newnick 2001:0db8:: * :newuser%0a%3c :irc.example.ircnow.org 312 newnick newnick irc.example.ircnow.org :irc.example.ircnow.org%0a%3c :irc.example.ircnow.org 378 newnick newnick :is connecting from *@2001:0db8::%0a%3c :irc.example.ircnow.org 379 newnick newnick :is using modes +iC%0a%3c :irc.example.ircnow.org 317 newnick newnick 15 1597224116 :seconds idle, signon time%0a%3c :irc.example.ircnow.org 318 newnick newnick :End of WHOIS list%0a%3c @]%0a%3c %0a%3c In this above example, the vhost is not showing up properly. If it shows up properly, you should see something like this:%0a%3c %0a%3c [@%0a%3c :irc.example.ircnow.org 311 newnick newnick newnick newnick.example.ircnow.org * :newnick%0a%3c :irc.example.ircnow.org 312 newnick newnick irc.example.ircnow.org :irc.example.ircnow.org%0a%3c :irc.example.ircnow.org 378 newnick newnick :is connecting from *@newnick.example.ircnow.org 2001:0db8:20:b4:f8fb:b8fa:9812:2562%0a%3c :irc.example.ircnow.org 379 newnick newnick :is using modes +iC%0a%3c :irc.example.ircnow.org 317 newnick newnick 86 1597224404 :seconds idle, signon time%0a%3c :irc.example.ircnow.org 318 newnick newnick :End of WHOIS list%0a%3c @]%0a%3c %0a%3c To join a channel:%0a%3c %0a%3c [@%0a%3c JOIN #ircnow%0a%3c @]%0a%3c %0a%3c To part a channel:%0a%3c %0a%3c [@%0a%3c PART #ircnow%0a%3c @]%0a%3c %0a%3c To send a message to a channel or user:%0a%3c %0a%3c [@%0a%3c PRIVMSG #ircnow :Hello, world!%0a%3c PRIVMSG Mom :Look ma, no client!%0a%3c @]%0a%3c %0a%3c To identify with NickServ:%0a%3c %0a%3c [@%0a%3c PRIVMSG Nickserv :identify PASSWORD%0a%3c @]%0a%3c %0a%3c To quit, just type CTRL+C.%0a\ No newline at end of file%0a