Samba4 How To

Jon Reeves jon at
Fri Dec 28 12:59:38 MST 2012

Hi all,

I've just successfully set up a Samba 4 DC on Centos 6.3 but found a few
things that I think should be added to the How To page on the wiki.

First off, can we add a section on what ports need to be opened?  I got
most of it working from a quick Google, only to find several hours later
that the Global Catalog could not be contacted.  Here are my iptables rules
that I think cover everything:

-A INPUT -p tcp -m tcp --dport 3268 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 1024 -j ACCEPT
-A INPUT -p udp -m udp --dport 389 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 389 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 464 -j ACCEPT
-A INPUT -p udp -m udp --dport 88 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 88 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 135 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 445 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 139 -j ACCEPT
-A INPUT -p udp -m udp --dport 137:138 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -p udp -m udp --dport 53 -j ACCEPT

Secondly, there are some entries missing from the smb.conf file for setting
up roaming profiles which prevents the profiles from being created.  This
is all detailed on this page:,
the section on "Creating the Roaming Profile Share").

Having said that, these were only minor things, and it was actually very
easy to get working and I'm really impressed with how well it works - many
thanks to everyone that has worked to put this together

Kind Regards

More information about the samba-technical mailing list