Firewall is for Close a service or secure it?

J

Jason Long

Guest
Hello all.
I want to know Firewall used to Close a service and port or secure them?
I Want to share a directory via Samba in CentOS 7 but I can't browse it because of Firewall. I must use below command to Stop firewall :

# systemctl stop firewalld.service

But, How can I enable Firewall and let Samba to share ? I mean is harden.

Tnx.
 


Firewalls have thousands of uses. They can be used to close a port or selectively open a port only to specific networks or IPs too. They can be used to provide QoS, complex routing, and control network access on a userid-by-userid basis.

Because different Linux distributions have different preferred ways to interface with the firewall, we need to know which OS you are running.
 
I use Debian 7.7 but I want to know how can I enable Samba in Firewall and Firewall Secure it and not Block it.
Can you show me a good book about Firewall or Linux in Firewall?
 
I use Debian 7.7 but I want to know how can I enable Samba in Firewall and Firewall Secure it and not Block it.
Can you show me a good book about Firewall or Linux in Firewall?

You can restrict access to samba using
hosts allow
hosts deny
in the stanza for each shared directory. This is documented in the manpage for smb.conf.

hosts allow = 150.203. EXCEPT 150.203.6.66

#if you use netgroups
hosts allow = @foonet

In linux, there is 1 firewall. It is part of the kernel. For years it was iptables. A new firewall is being deployed now that I know nothing about. I think it is trying to merge a few commands commonly used into an integrated solution. However, most people will use a end-user program to manage their firewall - ufw, gufw, and others. Those are just UIs over the real firewall.

A book? Sorry, I'm old and have been doing this stuff for years and years. Can't recommend any books. O'Reilly and No Starch Press are publishers I respect, however.

There are also some great online guides for firewalls at the LDP and debian admin areas. Firewalls are 10% of security, hardly the most important. Don't fall into the trap of thinking security comes from enabling a firewall, running a scan and calling it "secure forever." Attacks change over time and if we want our systems to be protected, then we need to be nimble and change too.
 
Wow... Such a great tips thanks and it really sounds awesome and the best part the Tips with how do we apply ... :)
 


Latest posts

Top