<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote type="cite">
  <pre wrap=""><div class="moz-txt-sig">Hi,

On Fri, 01 Dec 2006, Joseph Ollis wrote:

</div></pre>
  <blockquote type="cite">
    <pre wrap=""><span class="moz-txt-citetags">&gt; </span>I have a workgroup printer in my ltsp edubuntu computer lab(setup with
<span class="moz-txt-citetags">&gt; </span>the default two network cards, one connected to the school lan, and one
<span class="moz-txt-citetags">&gt; </span>connected to the switch for ltsp). I would like to share that printer
<span class="moz-txt-citetags">&gt; </span>with other computers within my school lan. The school computers use the
<span class="moz-txt-citetags">&gt; </span>10.0.0.* ip addresses and the edubuntu ltsp clients are using the
<span class="moz-txt-citetags">&gt; </span>192.168.13.*.  I have used iptables before so I tried the following at
<span class="moz-txt-citetags">&gt; </span>our ltsp server.
<span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 9100 -j DNAT --to 192.168.13.234:9100
<span class="moz-txt-citetags">&gt; </span>/sbin/iptables -A FORWARD -p tcp -i eth0 -o eth1 --dport 9100 -j ACCEPT
<span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>When I tried the printer setup on our XP machines, the setup worked 
<span class="moz-txt-citetags">&gt; </span>well, but would not print the test page. I am not receiving iptables log 
<span class="moz-txt-citetags">&gt; </span>errors in kern.log or dmesg. 
    </pre>
  </blockquote>
  <pre wrap=""><!---->
In what sense did the setup work well if you couldn't print? <span
 class="moz-smiley-s3"><span> ;-) </span></span>

Are you definitely printing over jetdirect (ie port 9100)?  If you run
something like:
        tcpdump dst port 9100
it should show you all packets in and out on port 9100. Using:
        tcpdump dst host 192.168.13.234
you should be able to see the rewritten packets.

  </pre>
  <blockquote type="cite">
    <pre wrap=""><span class="moz-txt-citetags">&gt; </span>Does anyone have any thoughts?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I guess the above should work but could you not just set up a CUPS print
queue on the Edubuntu server and point the 10.0.0.0/24 machines at the
edubuntu server?  I guess it adds a bit of a load to edubuntu, but not
much.  You can also have cups preprocess print jobs.

Gavin</pre>
</blockquote>
<br>
Thanks Gavin, using the tcpdump I figured out that I did not have Port
Forwarding enabled. I must have run into this problem 5-10 times,and I
always forget. Anyway, thank you for the help. A good article on how to
enable IP Forwarding is
<a class="moz-txt-link-freetext" href="http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/">http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/</a> .<br>
<br>
JO<br>
</body>
</html>