Re: netcat and iptables




----- Original Message -----
From: "Gregory P. Ennis" <PoMec@xxxxxxxxx>
Newsgroups: comp.unix.sco.misc
To: <distro@xxxxxxx>
Sent: Saturday, January 07, 2006 4:41 PM
Subject: netcat and iptables


>I am trying to use netcat from a (LOCAL_IP) SCO OpenServer 5.0.5 system
> to print through a (REMOTE_IP) Redhat 8.0 system using an iptables
> firewall. I am not able to reach the remote printer. If I am asking a
> question that belongs to a different news group please forgive me.
>
> First, I would like to thank A.P. Lawrence for his excellent resource
> http://aplawrence.com/SCOFAQ/scotec7.html on how to set up a remote
> printer using netcat !!!!
>
> I believe my problem is related to the firewall on remote system that
> uses Redhat 8.0. If I look at the packets coming through the firewall
> on the remote machine I see the following:
>
> 12050.834772 LOCAL_IP -> REMOTE_IP > jetdirect [SYN] Seq=818116775
> Ack=0 Win=24820 Len=0
> 12050.834882 REMOTE_IP -> LOCAL_IP TCP jetdirect > 2082 [RST, ACK]
> Seq=0 Ack=818116776 Win=0 Len=0
>
> It appears to me that the remote system is trying to send a reply back
> to the local machine but is not getting any additional response so it
> keeps sending the original packet. Does anyone have ideas how I could
> debug this. Do I need some sort of driver on the Redhat system that
> spools the print stream instead of connecting directly to the printer on
> the remote system.
>
> Thanks,

Is the remote linux box acting as a print server or as a port forwarding
router to a hardware print server?

You could configure that priter in linux, and then in sco use rlpr in place
of netcat (or use the "remote printer" option in scoadmin) to print to the
linux box.
Or if the linux box was also the gateway router for the remote lan then you
could have the linux box port-forward tcp 9100 to the print server (assuming
it is a print server that does jetdirect)

If the linux box is port forwarding to the print server, then one possible
gotcha is that unlike usual, in this case you need to set the default
gateway (to the linux box's lan ip) in the print server. Normally not only
don't you need that, but you actually don't want it.

Other than that I think you just need general "port forwarding with
iptables" help, which will be found mostly in linux forums via google.
I see that it's a common question with a lot of examples. Usually the
examples say how to make a web server work. You just think 9100 where they
say 80.

Brian K. White -- brian@xxxxxxxxx -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!

.



Relevant Pages

  • Re: SCO OS 5.0.6 Remote Printing - How to control the printer
    ... > We do remote printing to DLINK DP 300 printserver. ... How to get the lpr input to filter and send to ... Netcat allows you to use a standard interface ... If your DP 300 Print server does not accept DSC (Direct Socket ...
    (comp.unix.sco.misc)
  • Re: Remote Printer Problem.
    ... >a minolta on an external print server. ... ># Remote Line Printer ... You only say 'netcat just seems like a bandaid' because you have ...
    (comp.unix.sco.misc)
  • Re: Remote Printer Problem.
    ... >>a minolta on an external print server. ... >># Remote Line Printer ... >>In an earlier post it was suggested that I use netcat, ...
    (comp.unix.sco.misc)
  • Re: [kvm-devel] [PATCH] export notifier #1
    ... the other linux instance will be told that the page is not available. ... At least with KVM there ... the remote instance will have to wait for the linux pte to go away ... If you flush the remote instance _after_ clearing the main linux PTE ...
    (Linux-Kernel)
  • ANNOUNCE: moodss-17.16 and moomps-2.18
    ... please test the new thread enabled remote monitoring feature (pci, ... usb, hddtemp and diskstats Linux modules), which should never lock the ... use a shorter name (moodss) in the system tools menu ...
    (comp.lang.tcl)