Using ident spoofs with identserver and iptables
If you don't want to install oidentd, but still want proper idents - username@host instead of ~username@host, this is what you can try.
What you need
- You need root access.
- You need iptables.(iptables --version shouldn't say "command not found")
- You need a compiler.
How it's done
1. Download the identserver module from here.
2. Open it with a text editor and replace
m_serverPort = 113;
m_serverPort = 11300;
3. Save the cpp file.
4. compile this module and copy the .so file to your modules folder.
5. Load the module into ZNC. It's a global module.
6. Add this iptables rule:
iptables -t nat -A PREROUTING -p tcp -d 184.108.40.206 --dport 113 -j DNAT --to 220.127.116.11:11300
Replace both instances of 18.104.22.168 with your server's IP. If you have multiple "vhosts", you need to issue this command once for each IP.
7. That's it. If you did everything correctly, ZNC can now send ident replies without oidentd.
The rule from above will not stick across restarts. On Gentoo, you can use
to make it stick.
To delete/remove the rule, use the same command as above, but insert -D instead of -A:
iptables -t nat -D PREROUTING -p tcp -d 22.214.171.124 --dport 113 -j DNAT --to 126.96.36.199:11300