Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba with IPTables - Protocol Issue

Status
Not open for further replies.

hunterhunter

IS-IT--Management
Feb 13, 2006
5
US
Hey I'm using Samba with IPTables. I'm using webmin to configure things because it's easy to use and changes can be made quickly. I am however, a Samba noob. With that said, here goes.

Samba uses NetBIOS, ports 137-139. Now, in webmin, under the "Linux firewall" section I've added Samba. The ports are added, but "protocol" has a drop down menu so that you can select which protocol is allowed to communicate through those ports. NetBIOS is not in that list. What do I do? Could it be another protocol? Perhaps a Linux protocol that emulates NetBIOS???

Thanks for the help!
 
I'd choose both tcp and udp.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I can only select one :/

What else??

Thanks for the reply though. Now what else should I try?
 
You don't have a all option ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Nope :(
Only option is called "other..."
It won't work :(

Is NetBIOS perhaps called something else in the Linux world??

Thanks
 
And what happens if you choose others ... ?
protocol number 0 stands for all.
Have a look at the -p option in the iptables(8) man page.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Nothing.
BTW, I just jacked my iptables config... I guess I'll have to restart from scratch. Still, there is no zero, or all option. So what would NetBIOS be called??

Also, is there a command in Linux that can tell me which version of an application is installed?

Thanks!
 
I used Guarddog to configure the firewall for Samba. Allows you to select Samba and configures everything for you.

Else,
iptables -A INPUT -p tcp --dport 139 -m state --state NEW -j ACCEPT (allow new connections to tcp 139 from local area (not internet) )
iptables -A INPUT -p tcp --dport 445 -m state --state NEW -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p udp --dport 137 -m state --state NEW -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p udp --dport 138 -m state --state NEW -s 192.168.1.0/24 -j ACCEPT

Port 445 is important.

For the versions of software, it depends...
If you use RPMS
rpm -qa | grep packagename
For Slackware packages use pkgtool
etc.

Else, most binaries will have a -v or --version option


"If you always do what you've always done, you will always be where you've always been."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top