Hello Friends I am Deepak Saini and today I am trying to explain the working of tcp wrrapers.
TCP Wrappers can be used to GRANT or DENY access to various services on your machine to the outside network or other machines on the same network. It does this by using simple Access List Rules which are included in the two files /etc/hosts.allow and /etc/hosts.deny .
lets start
How works host.deny
Setups
1 If we want to apply tcp wrapper we are stop the service iptables.
syntax :- iptables stop
syntax :- chkconfig iptables off
2 How to banned a user to get the ssh service ?
syntax:- vim /etc/host.deny
and we are enter the line
sshd: <ip of user>
3 How to banned a ip range to get ssh service?
syntax:- vim /etc/host.deny
and we are enter the line
sshd: <<ip (192.168.0.0 /255.255.255.0>
4 On which daemon we are applying we must restart that daemon
syntax:- service sshd restart
How to allow in that case
1 If we are want to remove the ban of the ip range or user the we are removing the line from the host.deny file and restart the daemon.Our service is allow for that ip range or user.
How Works host.allow
1 How allow a specific user for ssh service
syntax :- vim /etc/host.allow
and enter the one line as well as host.deny
sshd: <user ip>
2 How to Allow a specific of the ip range
syntax:- vim /etc/host.allow
and here we enter same line which one we are enter in the host.deny
sshd: <ip range( 192.168.0.0/255.255.255.0)
and this ip range only allow to get the service sshd .
Thats all Friends Thanks for reading and srry for My R.I.P english _/\_ Jai Hind
TCP Wrappers can be used to GRANT or DENY access to various services on your machine to the outside network or other machines on the same network. It does this by using simple Access List Rules which are included in the two files /etc/hosts.allow and /etc/hosts.deny .
lets start
How works host.deny
Setups
1 If we want to apply tcp wrapper we are stop the service iptables.
syntax :- iptables stop
syntax :- chkconfig iptables off
2 How to banned a user to get the ssh service ?
syntax:- vim /etc/host.deny
and we are enter the line
sshd: <ip of user>
3 How to banned a ip range to get ssh service?
syntax:- vim /etc/host.deny
and we are enter the line
sshd: <<ip (192.168.0.0 /255.255.255.0>
4 On which daemon we are applying we must restart that daemon
syntax:- service sshd restart
How to allow in that case
1 If we are want to remove the ban of the ip range or user the we are removing the line from the host.deny file and restart the daemon.Our service is allow for that ip range or user.
How Works host.allow
1 How allow a specific user for ssh service
syntax :- vim /etc/host.allow
and enter the one line as well as host.deny
sshd: <user ip>
2 How to Allow a specific of the ip range
syntax:- vim /etc/host.allow
and here we enter same line which one we are enter in the host.deny
sshd: <ip range( 192.168.0.0/255.255.255.0)
and this ip range only allow to get the service sshd .
Thats all Friends Thanks for reading and srry for My R.I.P english _/\_ Jai Hind
0 comments:
Post a Comment