Next Previous Contents

6. Reverse piercing

6.1 Rationale

Sometimes, only one side of the firewall can launch telnet sessions into the other side; however, some means of communication is possible (typically, through e-mail). Piercing the firewall is still possible, by triggering with whatever messaging capability is available a telnet connection from the ``right'' side of the firewall to the other.

fwprc includes code to trigger such connections from a PGP-authentified e-mail message; all you need is add fwprc as a procmail filter to messages using the protocol, (instructions included in fwprc itself). Note however, that if you are to launch pppd with appropriate privileges, you might need create your own suid wrapper to become root. Instructions enclosed in fwprc.

Also, authentified trigger does not remotely mean secure connection. You should really use ssh (perhaps over telnet) for secure connections. And then, beware of what happens between the triggering of a telnet connection, and ssh taking over that connection. Contribution in that direction welcome.

6.2 Getting the triggering mail

If you are firewalled, your mail may as well be in a central server that doesn't do procmail filtering or allow telnet sessions. No problem! You can use fetchmail to run in daemon mode to poll and get mail to your client linux system, and/or add a cron job to automatically poll for mail every 1-5 minutes. fetchmail will forward mail to a local address through sendmail, which itself will have been configured to use procmail for delivery. Note that if you run fetchmail as a background daemon, it will lock away any other fetchmail that you'd like to run only at other times, like when you open a fwprc; of course, if you can also run a fetchmail daemon as a fake user. Too frequent a poll won't be nice to either the server or your host. Too infrequent a poll means you'll have to wait before the message gets read and the reverse connection gets established. I use two-minute poll frequency.


Next Previous Contents