Blame
Date:
Fri Dec 24 05:00:30 2021
UTC
Message:
Daily backup
11
2021-12-17
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%0a!! Debugging IRC%0a%0aTo test if you are able to establish an IRC connection, you can use netcat:%0a%0a[@%0a$ nc irc.ircnow.org 6667%0aNICK newnick%0aUSER newuser * * :newuser%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%0aYou can specifically use netcat to test if an IPv6 address is working:%0a%0a[@%0a$ nc -s 2001:0db8:: ipv6.ircnow.org 6667%0aNICK newnick%0aUSER newuser * * :newuser%0aPING :12345%0aPONG :12345%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 h%0aostname 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%0aTo join a channel:%0a%0a[@%0aJOIN #ircnow%0a@]%0a%0aTo part a channel:%0a%0a[@%0aPART #ircnow%0a@]%0a%0aTo send a message to a channel or user:%0a%0a[@%0aPRIVMSG #ircnow :Hello, world!%0aPRIVMSG Mom :Look ma, no client!%0a@]%0a%0aTo identify with NickServ:%0a%0a[@%0aPRIVMSG Nickserv :identify PASSWORD%0a@]%0a%0aTo quit, just type CTRL+C.
15
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