Printing on home LAN via internet

| No TrackBacks

A bit of trickery to print to a printer on my home LAN via the internet. The example below assumes the printer is being connected to externally on port 12345, and actually accepts connections on port 9100 (HP Jet Direct).

Tested and working, but may not be perfect. OS X wasn't able to identify the printer model automatically, but setting this manually let the jobs print normally.

# Printer
iptables -t nat -A prerouting_rule -d $WANIP -p tcp --dport 12345 -j DNAT --to
iptables -A forwarding_rule -d -p tcp --dport 9100 -j ACCEPT
iptables -t nat -A postrouting_rule -o $LAN -p tcp -s $network -d -m multiport --dports 9100 -j SNAT --to-source $WANIP

No TrackBacks

TrackBack URL:

About this Entry

This page contains a single entry by WRT Guy published on June 8, 2007 9:45 PM.

IP Tables was the previous entry in this blog.

Smoked router is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.



Powered by Movable Type 5.031