Samba Printer Share and iptables...

From: D. Krueger (
Date: 12/19/04

Date: Sun, 19 Dec 2004 17:23:22 +0100

Hi Folks,

I have a little bit troubble with my firewall and samba.

I use iptables on my router (redhat 9), a laserprinter is connected to this
box and now I want to share this printer to my lan via samba.

I tested it with opened firewall and all works fine but when the shields are
up then is the whole samba part very slowly.

here the opened ports in my firewall:

$iptables -P INPUT DROP
$iptables -P OUTPUT DROP
$iptables -P FORWARD DROP

$iptables -A INPUT -p udp -i eth1 --dport 137:138 -j ACCEPT $iptables -A
INPUT -p tcp -i eth1 --dport 139 -j ACCEPT
$iptables -A INPUT -p tcp -s --dport 631 -j ACCEPT

$iptables -A OUTPUT -m state --state ESTABLISHED,RELATED,NEW -j ACCEPT

With this setup, I can print but the access to the printer takes a while,
not so if I have open the firewall.

Have someone a idea to solve this problem ?


D. Krueger