[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Network Troublshooting  |  Linux Servers Support  |  Topic: Firewall settings for samba and cups
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: Firewall settings for samba and cups  (Read 1462 times)
0 Members and 1 Guest are viewing this topic.
nickcol
Linux Noob !
*
Offline Offline

Posts: 5


View Profile
« on: December 08, 2004, 10:57:35 AM »

Im running a rh9 server with samba - cups printing and webmin on it.

Cups is set to print to network printers on various ip:9100 and ip:9101

if IP tables is set to ALLOW ALL then the cups printing works.

but When you drop ALL INCOMING PACKETS Except for

TCP 1000 Webmin
TCP 22 SSL
TCP + UDP 137-139 Samba

Cups printing stops working. You cannot even access Printers through webmin. I have tried various ports ie 631 445  9100 but cannot get the printing to work with the firewall enabled.
 Samba shares and webmin are ok with it enabled.

Nick
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #1 on: December 08, 2004, 12:49:14 PM »

Quote from: "nickcol"
Im running a rh9 server with samba - cups printing and webmin on it.

Cups is set to print to network printers on various ip:9100 and ip:9101

if IP tables is set to ALLOW ALL then the cups printing works.

but When you drop ALL INCOMING PACKETS Except for

TCP 1000 Webmin
TCP 22 SSL
TCP + UDP 137-139 Samba

Cups printing stops working. You cannot even access Printers through webmin. I have tried various ports ie 631 445  9100 but cannot get the printing to work with the firewall enabled.
 Samba shares and webmin are ok with it enabled.

Nick


are you sure the rules you mad are correct !
btw. webmin uses port 10000 ,
You can made firewall in such way that i denyes all and then give access to only required one ...

that is.. Another approach to firewalls is to drop everything and then grant access to each port you may need.
Code:
iptables -F
iptables -A INPUT -i lo -p all -j ACCEPT                       - Allow self access by loopback interface
iptables -A OUTPUT -o lo -p all -j ACCEPT
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT - Accept established connections
iptables -A INPUT -p tcp --tcp-option ! 2 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p tcp -i eth0 --dport 21 -j ACCEPT          - Open ftp port
iptables -A INPUT -p udp -i eth0 --dport 21 -j ACCEPT
iptables -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT          - Open secure shell port
iptables -A INPUT -p udp -i eth0 --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT          - Open HTTP port
iptables -A INPUT -p udp -i eth0 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --syn -s 192.168.10.0/24 --destination-port 139 -j ACCEPT   - Accept local network Samba connection
iptables -A INPUT -p tcp --syn -s trancas --destination-port 139 -j ACCEPT
iptables -P INPUT DROP                                        - Drop all other connection attempts. Only connections defined

btw.. above is a copy + paste

You can also add other ports similarly..
Logged
nickcol
Linux Noob !
*
Offline Offline

Posts: 5


View Profile
« Reply #2 on: December 09, 2004, 06:38:30 AM »

Sorry webmin does use 10000, Typing mistake.

When I deny all on incoming packets on eth0

Then Allow the following
 
10000(webmin),  TCP 22 (SSL), TCP + UDP 137-139 (Samba), TCP80 (websrv)

Samba and webmin +ssl works but samba-cups printing to external network printers fails. I have tried to allow several ports and ranges but cannot find the correct one. Does anyone know. ?


Thanks

Nick
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Firewall using NAT (after configuring transparent proxy) General Networking Support in Linux kenchix1 1 1278 Last post March 02, 2004, 12:02:23 AM
by Ricky
How to set up a firewall General Networking Support in Linux softmafia 1 1038 Last post June 17, 2004, 04:18:37 PM
by DriverJC
IRQ settings Other Devices rajeev 1 1421 Last post June 29, 2004, 10:03:45 AM
by Ricky
proxy + firewall Linux Servers Support linuxdummy 0 820 Last post August 21, 2004, 04:40:15 AM
by linuxdummy
Configuring smoothwall corporate firewall 4 Distribution Specific praful_thakare 3 1239 Last post October 10, 2005, 11:52:49 AM
by Ricky
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 11:45:43 PM

Login with username, password and session length
Navigation
Recent Discussions
[Today at 11:30:52 PM]

[November 19, 2008, 07:52:41 PM]

[November 19, 2008, 07:52:36 PM]

[November 17, 2008, 10:42:59 AM]

[November 16, 2008, 12:49:47 AM]

[November 16, 2008, 12:48:58 AM]

[November 15, 2008, 08:29:02 AM]

[November 15, 2008, 08:24:41 AM]

[November 14, 2008, 05:11:50 AM]

[November 13, 2008, 03:28:22 AM]
Members
Total Members: 6222
Latest: shule
Stats
Total Posts: 8269
Total Topics: 2253
Online Today: 13
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 12
Total: 12
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc