Unable to access the samba sharing solution of Fedora

Source: Internet
Author: User
Unable to access the samba share of Fedora. after the samba service is configured, windows cannot be accessed. After many tests, it has been related to the firewall of fedora. Disable firewall: # serviceiptablesstop or clear rules: # iptables-Fwindows can access samba. The samba sharing of Fedora cannot be accessed. after the samba service is configured, windows cannot be accessed. After many tests, it has been related to the firewall of fedora. Disable firewall: # service iptables stop or clear rules: # iptables-F windows can access samba. After enabling iptables, we found that [root @ localhost user] # vi/etc/sysconfig/iptables # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. * filter: input accept [0: 0]: forward accept [0: 0]: output accept [0: 0]-a input-m state -- state ESTABLISHED, RELATED-j ACCEPT-A INPUT-p icmp-j ACCEPT-A INPUT-I lo-j ACCEPT-A INPUT-m state -- state NEW-m tcp-p tcp -- dpor T 22-j ACCEPT-A INPUT-j REJECT -- reject-with icmp-host-prohibited-a forward-j REJECT -- reject-with icmp-host-prohibited-a input-m state -- state NEW-m tcp-p tcp -- dport 139-j ACCEPT-A INPUT-m state -- state NEW-m tcp-p tcp -- dport 445-j ACCEPT-A INPUT-p udp-m udp -- dport 137-j ACCEPT-A INPUT-p udp-m udp -- dport 138-j ACCEPTCOMMIT found that there are two REJECT rules, remove the two and access samba. Then I remembered that the firewall rules should have a priority order. Therefore, the last four rules should be placed on the premise as follows: # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. * filter: input accept [0: 0]: forward accept [0: 0]: output accept [0: 0]-a input-m state -- state ESTABLISHED, RELATED-j ACCEPT-A INPUT-p icmp-j ACCEPT-A INPUT-I lo-j ACCEPT-A INPUT-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT-A INPUT-m stat E -- state NEW-m tcp-p tcp -- dport 139-j ACCEPT-A INPUT-m state -- state NEW-m tcp-p tcp -- dport 445-j ACCEPT-A INPUT-p udp- m udp -- dport 137-j ACCEPT-A INPUT-p udp-m udp -- dport 138-j ACCEPT-A INPUT-j REJECT -- reject-with icmp-host-prohibited-a forward-j REJECT -- reject-with icmp-host-prohibitedCOMMIT save. #/Etc/rc. d/init. d/iptables restart and windows successfully accesses samba. Supplement the ports and protocols used by the Samba Service: 1) Port 137 (UDP)-NetBIOS name service; nmbd2) Port 138 (UDP)-NetBIOS datagram service; 3) Port 139 (TCP) -file and print sharing; smbd (based on SMB (Server Message Block) protocol, mainly used in Lan, file sharing protocol) 4) Port 389 (TCP) -This Port is used by the LDAP (Active Directory Mode) 5) Port 445 (TCP)-NetBIOS service in IPVs 2000 and later versions. (Common Internet File System, CIFS, it is used for Internet file sharing after SMB protocol is extended to the Internet.) 6) Port 901 (TCP)-used for SWAT, used for webpage management. Samba is usually used by Windows and virtual machine Linux. Use ports 137, 138, and 139.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.