samba open port

Preface
to build samba time, if it is included net \ test environment, you can turn off the firewall directly, but if the case is outside the network, you need to open some ports on the firewall. Concrete steps to open, let's look.

Procedure
1. Add Port

cmd = --zone public-Firewall-Port --add = 80 / TCP --permanent (--permanent permanent, this does not restart the failed parameter)

2. reload

firewall-cmd --reload

3. Restart Firewall:

systemctl restart firewalld.service

 

Open specific ports to samba

 

firewall-cmd --zone=public --add-port=139/tcp --permanent
firewall-cmd --zone=public --add-port=445/tcp --permanent
firewall-cmd --zone=public --add-port=137/udp --permanent
firewall-cmd --zone=public --add-port=138/udp --permanent
 
firewall-cmd --reload
systemctl restart firewalld.service

 

 

Note: samba Development tcp / 139,445 ports, udp / 137,138 ports.

 

Summary
ports open on a few commands, put the port number, protocol into the need to open a specific port / protocol can be.

 

Guess you like

Origin www.cnblogs.com/faberbeta/p/samba002.html