https://wiki.znc.in/api.php?action=feedcontributions&user=Mikaela&feedformat=atomZNC - User contributions [en]2024-03-28T22:54:06ZUser contributionsMediaWiki 1.42.0-alphahttps://wiki.znc.in/index.php?title=Tor&diff=2597Tor2019-08-07T19:35:20Z<p>Mikaela: Undo revision 2596 by Mikaela (talk)</p>
<hr />
<div>==Introduction==<br />
This has been copied from http://area51archives.com/index.php?title=Using_ZNC_with_Tor&action=edit<br />
<br />
=== Alternative method===<br />
<br />
[https://github.com/znc/znc/issues/143 There is an open issue at GitHub on supporting SOCKS proxies directly] and [https://github.com/znc/znc/issues/143#issuecomment-12858126 there user ErebusBat gives alternative method quoted below].<br />
<br />
<br />
----<br />
<br />
FYI this can be easily accomplished using <code>socat</code> by running the following command on the ZNC server, then using <code>127.0.0.1:4321</code> as the server in ZNC.<br />
<br />
Freenode via TOR:<br />
<code>socat TCP4-LISTEN:4321,fork SOCKS4A:localhost:freenodeok2gncmy.onion:6697,socksport=9050</code><br />
<br />
Assume you just want to use proxy.mycompany.com:8080 as your SOCKS proxy, then the command would be:<br />
<code>socat TCP4-LISTEN:4321,fork SOCKS4A:proxy.mycompany.com:freenodeok2gncmy.onion:6697,socksport=8080</code><br />
<br />
Obviously you can replace the .onion address with another IRC server, or change the port.<br />
<br />
==Installing Tor==<br />
Follow the instructions at the [https://www.torproject.org/docs/debian.html.en tor installation guide].<br />
<br />
==Installing ZNC==<br />
The [http://wiki.znc.in/Installation installation page] gives you an easy walkthrough on compiling and install ZNC for your distribution of choice. This page will have the most up to date version listed quicker than the PPA listed below. For novices, the PPA should serve to be easier to maintain, but comes with a potential lapse of updates. It's your choice.<br />
<br />
For Ubuntu-based distros, please refer to the Ubuntu section in the installation guide to install ZNC.<br />
<br />
After you have compiled and/or installed znc, you need to configure znc before continuing by running:<br />
znc --makeconf<br />
At the end of the makeconf screen when it asks if you would like to launch ZNC, select "no."<br />
<br />
==ProxyChains==<br />
Tor ships with a SOCKS proxy which is used to tunnel traffic through the Tor network. ZNC doesn't have the option to use SOCKS proxies, that's where ProxyChains comes in. ProxyChains allows you to force an application to use a SOCKS proxy. Luckily, ProxyChains is configured to work with Tor out of the box! You may already have ProxyChains installed. If not, it's a simple run of this command to get it:<br />
sudo apt-get install proxychains<br />
If you are not able to get it via apt, or are not using Ubuntu, you can acquire the source from the [http://proxychains.sourceforge.net/ ProxyChains website].<br />
<br />
==.onion Resolution==<br />
At this point, you can simply run '''proxychains znc''' from the command line. This will start up znc and tunnel its connections via Tor. However, it will not work if you attempt to connect to .onion addresses. If you run znc as a system service, then you'll need to edit that config file to launch znc via proxychains.<br />
What we will have to do instead, is map an IP address in the Tor configuration to resolve to the .onion address. This is annoying, but it's really your only shot of making this work. You will want to use an IP range that you will not use, and never plan on using.<br />
Let's say you want to connect to 2600net. The .onion address is ''awwqg2ishrohngue.onion''. You would need to open the '''/etc/tor/torrc''' file and add at the end of the file:<br />
mapaddress 10.99.99.90 awwqg2ishrohngue.onion<br />
If you were to try to connect to freenode's hidden service (via tor-sasl), you would instead add at the end of the '''/etc/tor/torrc''' file:<br />
mapaddress 10.99.99.90 freenodeok2gncmy.onion<br />
Save the file, and restart Tor using:<br />
sudo /etc/init.d/tor restart<br />
...and now you will be able to connect to that .onion address in ZNC by using the server address of ''10.99.99.90''. For each .onion address you would like to resolve, just add another mapaddress line.<br />
<br />
[[Category: Software]]</div>Mikaelahttps://wiki.znc.in/index.php?title=Tor&diff=2596Tor2019-08-07T19:24:42Z<p>Mikaela: /* .onion Resolution */ Correct freenode instructions for also having a valid certificate</p>
<hr />
<div>==Introduction==<br />
This has been copied from http://area51archives.com/index.php?title=Using_ZNC_with_Tor&action=edit<br />
<br />
=== Alternative method===<br />
<br />
[https://github.com/znc/znc/issues/143 There is an open issue at GitHub on supporting SOCKS proxies directly] and [https://github.com/znc/znc/issues/143#issuecomment-12858126 there user ErebusBat gives alternative method quoted below].<br />
<br />
<br />
----<br />
<br />
FYI this can be easily accomplished using <code>socat</code> by running the following command on the ZNC server, then using <code>127.0.0.1:4321</code> as the server in ZNC.<br />
<br />
Freenode via TOR:<br />
<code>socat TCP4-LISTEN:4321,fork SOCKS4A:localhost:freenodeok2gncmy.onion:6697,socksport=9050</code><br />
<br />
Assume you just want to use proxy.mycompany.com:8080 as your SOCKS proxy, then the command would be:<br />
<code>socat TCP4-LISTEN:4321,fork SOCKS4A:proxy.mycompany.com:freenodeok2gncmy.onion:6697,socksport=8080</code><br />
<br />
Obviously you can replace the .onion address with another IRC server, or change the port.<br />
<br />
==Installing Tor==<br />
Follow the instructions at the [https://www.torproject.org/docs/debian.html.en tor installation guide].<br />
<br />
==Installing ZNC==<br />
The [http://wiki.znc.in/Installation installation page] gives you an easy walkthrough on compiling and install ZNC for your distribution of choice. This page will have the most up to date version listed quicker than the PPA listed below. For novices, the PPA should serve to be easier to maintain, but comes with a potential lapse of updates. It's your choice.<br />
<br />
For Ubuntu-based distros, please refer to the Ubuntu section in the installation guide to install ZNC.<br />
<br />
After you have compiled and/or installed znc, you need to configure znc before continuing by running:<br />
znc --makeconf<br />
At the end of the makeconf screen when it asks if you would like to launch ZNC, select "no."<br />
<br />
==ProxyChains==<br />
Tor ships with a SOCKS proxy which is used to tunnel traffic through the Tor network. ZNC doesn't have the option to use SOCKS proxies, that's where ProxyChains comes in. ProxyChains allows you to force an application to use a SOCKS proxy. Luckily, ProxyChains is configured to work with Tor out of the box! You may already have ProxyChains installed. If not, it's a simple run of this command to get it:<br />
sudo apt-get install proxychains<br />
If you are not able to get it via apt, or are not using Ubuntu, you can acquire the source from the [http://proxychains.sourceforge.net/ ProxyChains website].<br />
<br />
==.onion Resolution==<br />
At this point, you can simply run '''proxychains znc''' from the command line. This will start up znc and tunnel its connections via Tor. However, it will not work if you attempt to connect to .onion addresses. If you run znc as a system service, then you'll need to edit that config file to launch znc via proxychains.<br />
What we will have to do instead, is map an IP address in the Tor configuration to resolve to the .onion address. This is annoying, but it's really your only shot of making this work. You will want to use an IP range that you will not use, and never plan on using.<br />
Let's say you want to connect to 2600net. The .onion address is ''awwqg2ishrohngue.onion''. You would need to open the '''/etc/tor/torrc''' file and add at the end of the file:<br />
mapaddress 10.99.99.90 awwqg2ishrohngue.onion<br />
If you were to try to connect to freenode's hidden service (via tor-sasl), you would instead add at the end of the '''/etc/tor/torrc''' file:<br />
mapaddress zottel.freenode.net ajnvpgl6prmkb7yktvue6im5wiedlz2w32uhcwaamdiecdrfpwwgnlqd.onion<br />
Save the file, and restart Tor using:<br />
sudo /etc/init.d/tor restart<br />
...and now you will be able to connect to that .onion address in ZNC by using the server address of ''zottel.freenode.net'' and have the certificate validate successfully. For each .onion address you would like to resolve, just add another mapaddress line.<br />
<br />
[[Category: Software]]</div>Mikaelahttps://wiki.znc.in/index.php?title=Perform&diff=2506Perform2019-01-14T20:54:11Z<p>Mikaela: /* Setting modes on connect */ Formatting and mentioning issue 1221 for performless mode setting</p>
<hr />
<div>{{DISPLAYTITLE:perform}}<br />
{{Core Module | version = 0.047}}<br />
<br />
This module is used to perform one or more user-specified commands when connecting ZNC to the IRC network. It can be loaded as a user module or a network module.<br />
<br />
* If the module is loaded as a '''user module''', it will perform the command(s) on all network(s) the user has.<br />
* If the module is loaded as a '''network module''', it will perform the command(s) only on that specific network.<br />
<br />
== Usage ==<br />
<br />
{{Module arguments<br />
| type = network}}<br />
<br />
=== Commands ===<br />
<br />
; <code>Add <command></code><br />
: Adds perform command to be sent to the server on connect<br />
<br />
; <code>Del <number></code><br />
: Delete a perform command<br />
<br />
; <code>Execute</code><br />
: Send the perform commands to the server now<br />
<br />
; <code>Help <?search></code><br />
: Generate this help output, optionally search for word/prase in this output.<br />
<br />
; <code>List</code><br />
: List the perform commands<br />
<br />
; <code>Swap <number> <number></code><br />
: Swap two perform commands (to change the order in which commands are sent)<br />
<br />
=== Examples ===<br />
<br />
The perform list is automatically saved on changes. See [[ExpandString]] for a list of available variables (e.g. <code>%nick%</code>)<br />
<br />
==== Identifying to services ====<br />
<br />
Identifying to [http://www.undernet.org Undernet]:<br />
/msg *perform add PRIVMSG X@Channels.undernet.org :LOGIN <username> <password><br />
<br />
Identifying to [http://quakenet.org QuakeNet] (alternatively, use the [[q]] module rather than perform on QuakeNet):<br />
/msg *perform add PRIVMSG Q@CServe.quakenet.org :AUTH <username> <password><br />
<br />
===== NickServ =====<br />
<br />
{{ambox|text=[[sasl]] is the preferred module for identifying to services, as it identifies you before you are even visible to the network. There is also a [[nickserv|nickserv module]], which identifies you every time NickServ asks for it (not just on connect).}}<br />
<br />
Identifying to NickServ (see <code>/msg nickserv help identify</code> for the syntax and try <code>/quote nickserv help</code> to see that the NICKSERV command works):<br />
/msg *perform add NICKSERV identify <username> <password><br />
<br />
Identifying to NickServ if NICKSERV is not supported:<br />
/msg *perform add PRIVMSG NickServ :identify username password<br />
<br />
''The difference between <code>/nickserv</code> and <code>PRIVMSG</code> (<code>/msg</code>) is that <code>/nickserv</code> is usually IRCd-side alias that checks that NickServ is a real service—to just a user who has changed their nick to "NickServ." If this is ever the case, <code>/msg</code> would have sent your password to the impostor. The <code>:</code> is important, otherwise everything after <code>identify</code> gets dropped.''<br />
<br />
===== Bitlbee =====<br />
<br />
/msg *perform add PRIVMSG &bitlbee :identify <password><br />
<br />
You could also replace <code>&bitlbee</code> with <code>root</code>, but that would make root send all connect/disconnect etc. messages in PM causing potentially annoying alerts in your client.<br />
<br />
==== Setting modes on connect ====<br />
<br />
:''The following modes are fairly common, but check with your IRC network to see if these modes will function as described here, or if they exist at all on that network.''<br />
<br />
::''[https://github.com/znc/znc/issues/1221 Performless mode setting is tracked in issue 1221 at GitHub.]''<br />
<br />
Setting umode +Xx on connect (X or x enables cloaking on some IRCds):<br />
/msg *perform add mode %nick% +Xx<br />
<br />
Setting umode +w on connect for receiving wallops:<br />
/msg *perform add mode %nick% +w<br />
<br />
Setting all three modes on connect:<br />
/msg *perform add mode %nick% +Xxw<br />
<br />
==== Opering up ====<br />
<br />
Logging in as IRC operator on connect:<br />
/msg *perform add OPER USER PASSWORD<br />
<br />
==== Idlerpg ====<br />
<br />
For general idea of what idlerpg is, [http://www.idlerpg.net/ see their homepage.] This example is here, because sometimes [https://github.com/znc/znc/issues/1039 people request a module for it.]<br />
<br />
/msg *perform add JOIN #idlerpg<br />
/msg *perform add PRIVMSG IDLEBOT :login username password<br />
<br />
First you tell perform to join the channel and then you login to IDLEBOT. You should be on the channel when IDLEBOT receives the command and if you didn't add the join command you will most likely receive error about not being on the channel. ''Do replace #idlerpg and IDLEBOT with the actual channel and nick of the bot.''<br />
<br />
==== Listing, removing, or re-ordering commands ====<br />
<br />
; Listing commands to be executed on connecting:<br />
: <code>/msg *perform list</code><br />
<*perform> ------<br />
<*perform> Id: 1<br />
<*perform> Perform: PRIVMSG NickServ :GHOST myname mysecretpassword<br />
<*perform> ------<br />
<*perform> Id: 2<br />
<*perform> Perform: mode %nick% +wix<br />
<*perform> Expanded: mode myname +wix<br />
<*perform> ------<br />
<*perform> Id: 3<br />
<*perform> Perform: PRIVMSG IdleBot :LOGIN myuser mysecretpassword<br />
<*perform> ------<br />
<*perform> Id: 4<br />
<*perform> Perform: JOIN #idleRPG<br />
<*perform> ------<br />
<br />
; Swap position of commands 3 and 4.<br />
: <code>/msg *perform swap 3 4</code><br />
<*perform> Commands Swapped.<br />
<br />
; Add a new command.<br />
: <code>/msg *perform add NOTICE %nick% :You’ve logged on.</code><br />
<*perform> Added!<br />
<br />
; Delete command in position 5.<br />
: <code>/msg *perform del 5</code><br />
<*perform> Command Erased.</div>Mikaelahttps://wiki.znc.in/index.php?title=User:Mikaela&diff=2494User:Mikaela2018-11-26T16:49:03Z<p>Mikaela: Something more relevant to ZNC</p>
<hr />
<div><br />
I have been using ZNC since maybe 2014. I try to help on #znc whenever I can and at some point I became op.</div>Mikaelahttps://wiki.znc.in/index.php?title=User:Mkaysi&diff=2493User:Mkaysi2018-11-26T16:46:00Z<p>Mikaela: Mikaela moved page User:Mkaysi to User:Mikaela: My account was renamed a long time ago.</p>
<hr />
<div>#REDIRECT [[User:Mikaela]]</div>Mikaelahttps://wiki.znc.in/index.php?title=User:Mikaela&diff=2492User:Mikaela2018-11-26T16:46:00Z<p>Mikaela: Mikaela moved page User:Mkaysi to User:Mikaela: My account was renamed a long time ago.</p>
<hr />
<div><nowiki>#GirlsLikeUs, #AS-person, #Feminist & #Linux user since 2008 with various distributions, likes #computers and #fantasy books.</nowiki></div>Mikaelahttps://wiki.znc.in/index.php?title=Talk:Irssi&diff=2491Talk:Irssi2018-11-26T16:45:12Z<p>Mikaela: /znc command is wrong</p>
<hr />
<div>== /znc ==<br />
<br />
:[quote]Irssi does not send unknown commands to irc server or znc so you will get an unknown command error when you try to use the /znc alias. If you want /znc to work you need to enter /alias znc msg *status.[/quote]<br />
::I think this is wrong as /znc also works for /znc *module message, while this instruction ties it to /msg *status. I am not an irssi user though, so I have no idea what it should be. [[User:Mikaela|Mikaela]] ([[User talk:Mikaela|talk]]) 16:44, 26 November 2018 (UTC)</div>Mikaelahttps://wiki.znc.in/index.php?title=Tor&diff=2480Tor2018-10-16T21:19:53Z<p>Mikaela: /* Introduction */ copy ErebusBat and change freenode onion to the new one</p>
<hr />
<div>==Introduction==<br />
This has been copied from http://area51archives.com/index.php?title=Using_ZNC_with_Tor&action=edit<br />
<br />
=== Alternative method===<br />
<br />
[https://github.com/znc/znc/issues/143 There is an open issue at GitHub on supporting SOCKS proxies directly] and [https://github.com/znc/znc/issues/143#issuecomment-12858126 there user ErebusBat gives alternative method quoted below].<br />
<br />
<br />
----<br />
<br />
FYI this can be easily accomplished using <code>socat</code> by running the following command on the ZNC server, then using <code>127.0.0.1:4321</code> as the server in ZNC.<br />
<br />
Freenode via TOR:<br />
<code>socat TCP4-LISTEN:4321,fork SOCKS4A:localhost:freenodeok2gncmy.onion:6697,socksport=9050</code><br />
<br />
Assume you just want to use proxy.mycompany.com:8080 as your SOCKS proxy, then the command would be:<br />
<code>socat TCP4-LISTEN:4321,fork SOCKS4A:proxy.mycompany.com:freenodeok2gncmy.onion:6697,socksport=8080</code><br />
<br />
Obviously you can replace the .onion address with another IRC server, or change the port.<br />
<br />
==Installing Tor==<br />
Follow the instructions at the [https://www.torproject.org/docs/debian.html.en tor installation guide].<br />
<br />
==Installing ZNC==<br />
The [http://wiki.znc.in/Installation installation page] gives you an easy walkthrough on compiling and install ZNC for your distribution of choice. This page will have the most up to date version listed quicker than the PPA listed below. For novices, the PPA should serve to be easier to maintain, but comes with a potential lapse of updates. It's your choice.<br />
<br />
For Ubuntu-based distros, please refer to the Ubuntu section in the installation guide to install ZNC.<br />
<br />
After you have compiled and/or installed znc, you need to configure znc before continuing by running:<br />
znc --makeconf<br />
At the end of the makeconf screen when it asks if you would like to launch ZNC, select "no."<br />
<br />
==ProxyChains==<br />
Tor ships with a SOCKS proxy which is used to tunnel traffic through the Tor network. ZNC doesn't have the option to use SOCKS proxies, that's where ProxyChains comes in. ProxyChains allows you to force an application to use a SOCKS proxy. Luckily, ProxyChains is configured to work with Tor out of the box! You may already have ProxyChains installed. If not, it's a simple run of this command to get it:<br />
sudo apt-get install proxychains<br />
If you are not able to get it via apt, or are not using Ubuntu, you can acquire the source from the [http://proxychains.sourceforge.net/ ProxyChains website].<br />
<br />
==.onion Resolution==<br />
At this point, you can simply run '''proxychains znc''' from the command line. This will start up znc and tunnel its connections via Tor. However, it will not work if you attempt to connect to .onion addresses. If you run znc as a system service, then you'll need to edit that config file to launch znc via proxychains.<br />
What we will have to do instead, is map an IP address in the Tor configuration to resolve to the .onion address. This is annoying, but it's really your only shot of making this work. You will want to use an IP range that you will not use, and never plan on using.<br />
Let's say you want to connect to 2600net. The .onion address is ''awwqg2ishrohngue.onion''. You would need to open the '''/etc/tor/torrc''' file and add at the end of the file:<br />
mapaddress 10.99.99.90 awwqg2ishrohngue.onion<br />
If you were to try to connect to freenode's hidden service (via tor-sasl), you would instead add at the end of the '''/etc/tor/torrc''' file:<br />
mapaddress 10.99.99.90 freenodeok2gncmy.onion<br />
Save the file, and restart Tor using:<br />
sudo /etc/init.d/tor restart<br />
...and now you will be able to connect to that .onion address in ZNC by using the server address of ''10.99.99.90''. For each .onion address you would like to resolve, just add another mapaddress line.<br />
<br />
[[Category: Software]]</div>Mikaela