Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.
# Why lua-identd?
Oidentd is complex. Identd is a protocol best relegated. The only reason we still use either of these things is to keep "~" from showing up in front of our ident on IRC. Oidentd had a bug on FreeBSD that when it was built in one's own repos, vs utilized from FreeBSD's quarterly branch repos, it could not service IPv6 appropriately. In the end, oidentd hasn't seen updates in years, but it may have picked up development again recently. Even so, why run something that does all the actual work of an identd, when you aren't and shouldn't be using it for anything other than IRC likely. If you're worrying with IRC and are using a bouncer (likely ZNC), then why not have a program that'll run alongside it and handle it for you, without doing all the real checks behind the scenes.
Enter lua-identd. It's an identd written in lua for the express purpose of integrating with ZNC. It might support other ways as well in the future for those who wish to have something of the sorts with their own ways of doing things than using a ZNC.
For now, it's a small, networked process, that should be (hopefully) bug-free in regards to it's mandate, service ident requests from IRC servers for your ZNC. It does not daemonize itself. It is another program's responsibility to daemonize it. The following should give an idea of it's useage. Don't look at it as hard, the instructions below may seem lengthy but they are fairly in depth. About half of it could be omitted as hand holding or FAQ's. Let us know how it works for you (or doesn't) by submitting a bug request or commenting on our(https://code.amlegion.org/lua-identd/tktview?name=f52ff8c3e7).
# Setup instructions:
**This is designed to be ran as root. We encourage you to overview the code and insure that it will not violate your machine.**
To get this running the following things will be needed:
Optionally, to make the process easier, use luarocks(https://luarocks.org/) to install the formerly specified.
If you're running FreeBSD, you may need to manually install cqueues like the following:
fetch https://github.com/wahern/cqueues/archive/rel-20171014.tar.gz tar xvf rel-20171014.tar.gz cd cqueues-rel-20171014 make all 5.3 make install
The cqueues example assumes a **root** user will run `make install`, if not you'll need to do some edits to get it to install into a different location. It does require the `gmake` program to be installed `pkg install gmake`.
If you need to install luarocks from source, the following directions are specific for FreeBSD and will only need slight tweaking if you're using a Linux Distribution:
# if freebsd, use fetch, otherwise use wget fetch https://github.com/luarocks/luarocks/archive/v2.4.4.tar.gz tar xvf v2.4.4.tar.gz cd luarocks-2.4.4 # change with-lua-include if using custom built lua and/or not on FreeBSD ./configure --with-lua-include=/usr/local/include/lua53 make build make install
Once again, this assumes the `make install` step will be ran as **root**, it's left up to the user to do differently if they wish to have luarocks and/or cqueues not install system-wide.
If you're running FreeBSD you'll likely want to make use of the program `daemon` that comes with FreeBSD. If you're running a Linux Distribution you'll probably wish to attain software such as `daemonize` which is of sorts like daemon. It is up to you to create either a rc.conf, SysV init, OpenRC init, or systemd unit file. For our purposes we'll assume a moderately featureful version of cron and that you either have daemon, or daemonize and use these in the stead of tying into a system init.
To run, if you used luarocks, you need to get luarocks to setup your script, you'll need to use the actual locations of where you placed lua-identd (lidentd.lua) and so forth (we'll use `$lidentd_path` as the var for it):
luarocks path > ./start-lidentd.sh echo $lua53_binary $lidentd_path >> ./start-lidentd.sh
Then crontab -e and add a (either daemonize or daemon) line to cron like so:
@reboot daemon $path/start-lidentd.sh
where `$path` evaluates to exactly where you stuck `./start-lidentd.sh`.
If you want PID files and/or Lock files etc, it's up to you to read the documentation of "daemon" (FreeBSD), daemonize (Linux), or whatever tool you deign to use for this purpose of starting lua-identd at boot.
To setup the lua-identd program, just open it up, and look for the "Configuration Below" and "Configuration ends here" lines, all between it is for user editing. `idp` is where znc will place it's ident lines (znc identfile module). `port` is the port that it'll run on (if you wish to run it non-root you'll need to configure port forwarding for IPv4 and IPv6 to a different port). `address` defaults to "::" which is basically all IPv6 and IPv4, which you should leave be unless you're using multiple znc processes and thus need multiple lidentd processes to listen on different addresses (which may indicate that you are absent of the knowledge of znc's ability to connect to multiple networks and support multiple users). `log_config` defines what `dir` it'll log in, and what level's it'll log, and what level it'll log to the logfile it'll manage, or print to screen.
To setup the ZNC, you'll need to do the following:
/msg *identfile setformat %ident% /msg *identfile setfile /home/znc/.oidentd.conf
The selection of file names and so forth are completely arbitrary and you are welcome to change things up as the system should be flexible enough to handle differences. The location of the file the lidentd software depends to have the related ident servicing text that ZNC provides can be anywhere you choose. The log locations for the lidentd software can go anywhere you choose. Much of this is more example than absolute the final say so on what to do to get up and running. Do customize this to how you wish to run your system.
Remember, lua-identd is designed to be ran as root, anything different and you've got some nice configuration to handle on your own.