Re: netcat and iptables
- From: "Brian K. White" <brian@xxxxxxxxx>
- Date: 7 Jan 2006 18:03:39 -0500
----- 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!
.
- References:
- netcat and iptables
- From: Gregory P. Ennis
- netcat and iptables
- Prev by Date: netcat and iptables
- Next by Date: Re: OpenServer 6.0.0 and mapchan
- Previous by thread: netcat and iptables
- Index(es):
Relevant Pages
|
|