LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-27-2009, 09:17 AM   #1
linux obsessed
LQ Newbie
 
Registered: Sep 2007
Location: /home
Distribution: Linux
Posts: 25
Blog Entries: 1

Rep: Reputation: 0
iptables and samba problem


hello to every one
at first i installed debian 5
and i want enter on my workgroup using windows xp pcs,in same time i want use firewall
now when i stop firewall i can access on the pcs
but when i start iptables and open port for samba such as 137,138,138 and 445 i can't access on any pc on workgruop
this is the output of iptables -L command
Code:
Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     udp  --  anywhere             anywhere            udp dpt:netbios-ns state NEW 
ACCEPT     udp  --  anywhere             anywhere            udp dpt:netbios-dgm state NEW 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:netbios-ssn state NEW 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:microsoft-ds state NEW 

Chain FORWARD (policy DROP)
target     prot opt source               destination         

Chain OUTPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere
now i want know what's my error and how i resolve it
thanks for all in this great forum
 
Old 02-28-2009, 05:49 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Try removing --state NEW on the firewall rules for the Samba ports.
 
Old 02-28-2009, 08:24 AM   #3
linux obsessed
LQ Newbie
 
Registered: Sep 2007
Location: /home
Distribution: Linux
Posts: 25

Original Poster
Blog Entries: 1

Rep: Reputation: 0
same problem after removing
this commands i entered
Code:
 iptables -I INPUT -p udp --dport 137 -j ACCEPT
 iptables -I INPUT -p udp --dport 138 -j ACCEPT
 iptables -I INPUT -p tcp --dport 139 -j ACCEPT
 iptables -I INPUT -p tcp --dport 445 -j ACCEPT
and this output of iptables -L
Code:
Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:microsoft-ds 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:netbios-ssn 
ACCEPT     udp  --  anywhere             anywhere            udp dpt:netbios-dgm 
ACCEPT     udp  --  anywhere             anywhere            udp dpt:netbios-ns 
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 

Chain FORWARD (policy DROP)
target     prot opt source               destination         

Chain OUTPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere
thank you
 
Old 03-01-2009, 07:53 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
iptables -I INPUT -p udp --dport 137 -j ACCEPT
iptables -I INPUT -p udp --dport 138 -j ACCEPT
iptables -I INPUT -p tcp --dport 139 -j ACCEPT
iptables -I INPUT -p tcp --dport 445 -j ACCEP
Try changing -I to -A.

These are the rules in my firewall script to allow Samba to my local 10.1.1. network
Quote:
$IPTABLES -A INPUT -i $EXTIF -s 10.1.1.1/27 -p udp --dport 137 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -s 10.1.1.1/27 -p udp --dport 138 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -s 10.1.1.1/27 -p tcp --dport 139 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -s 10.1.1.1/27 -p tcp --dport 445 -j ACCEPT
 
Old 03-01-2009, 08:58 AM   #5
linux obsessed
LQ Newbie
 
Registered: Sep 2007
Location: /home
Distribution: Linux
Posts: 25

Original Poster
Blog Entries: 1

Rep: Reputation: 0
same problem no new
i am waiting the resolve
thanks
 
Old 03-01-2009, 10:30 PM   #6
linux obsessed
LQ Newbie
 
Registered: Sep 2007
Location: /home
Distribution: Linux
Posts: 25

Original Poster
Blog Entries: 1

Rep: Reputation: 0
i fixed problem by enter to pc by his ip address as smb://10.0.0.20
but cant by his name
thanks
 
Old 03-02-2009, 07:33 AM   #7
linux obsessed
LQ Newbie
 
Registered: Sep 2007
Location: /home
Distribution: Linux
Posts: 25

Original Poster
Blog Entries: 1

Rep: Reputation: 0
forget it with out open any port and firewall started
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with iptables and Samba mac1234mac Linux - Networking 5 03-17-2006 08:22 AM
A common problem on samba + iptables scng Linux - Networking 4 06-19-2005 03:52 AM
iptables and samba shankariyer Linux - Security 1 02-18-2004 01:26 AM
iptables and SAMBA oracsol Linux - Networking 2 10-08-2003 09:33 AM
Samba Network Browsing/IPTables Problem RedHatMN Linux - Networking 8 08-26-2003 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration