Session-77 | Allow/Deny Access From Selected IP Addresses Or Networks Through SSH | Nehra Classes

  Рет қаралды 5,186

Nehra Classes

Nehra Classes

2 жыл бұрын

Session-77 | Allow/Deny Access From Selected IP Addresses Or Networks Through SSH | Nehra Classes
*********
🎬 Video Chapters: 👇
00:00 Channel Intro
*********
✅ Click Here 👉 kzbin.info?...
*********
📚 Available Courses Playlists For Members:
RHCSA (Hindi) 👉 • RedHat Certified Linux...
RHCSA (English) 👉 • RedHat Certified Linux...
RHCE (Hindi) 👉 • RHCSA 9 (EX 200) + RHC...
RHCE (English) 👉 • RedHat Certified Engin...
Ansible (English) 👉 • Ansible Training
Shell Scripting (English)👉 • Bash Shell Scripting T...
AWS (English) 👉 • AWS Solution Architect...
*********
🤝 Join Membership 👉 / @nehraclasses
*********
🙏🙏 Thanks for watching the video. If it helped you then, please do like & share it with others as well. Feel free to post your queries & suggestions in the comment box, we will be happy to answer your queries.
👍👍 If you like our hard work then please do subscribe to our channel & turn on the bell notification to get the latest notifications of our video.
*****
My DSLR Camera 👉 amzn.to/36954Ml
My Microphone 👉 amzn.to/3mZavTS
My iPhone 👉 amzn.to/3lWa63j
My Gaming Router 👉 amzn.to/3j3dQON
My FireStick 👉 amzn.to/345150F
My Head-Phone 👉 amzn.to/3ie4rDB
******
My Dream Laptop 👉 amzn.to/37j11fp
My Dream TV 👉 amzn.to/2KR32b4
My Dream IPhone 👉 amzn.to/36j8oE1
******
📲 Contact Us:
Telegram 👉 t.me/NehraClasses
Email 👉 nehraclasses@gmail.com
******
✅ Follow Us On Social Media Platforms:
Twitter Handle 👇
/ nehraclasses
Facebook Page 👇
/ nehraclasses
Instagram Handle 👇
/ nehraclasses
Website 👇
nehraclassesonline.business.s...
=======
©COPYRIGHT. ALL RIGHTS RESERVED.
#NehraClasses #NehraClassesLive #LinuxTraining

Пікірлер: 12
@NehraClasses
@NehraClasses 2 жыл бұрын
Allow/Deny Access From Selected IP Addresses Or Network Via SSH in Linux: ------------------------------------------------------------------------- Allow/Deny Access Using TCP Wrappers (Works only on RHEL 7): # cat /etc/redhat-release # ip a Check IP Address of other machine from where you want to login. Winodws: # ipconfig Linux: # ifconfig OR # ip a # ssh root@192.168.0.164 # exit # ls -l /etc/hosts.* Edit hosts.deny file to deny the access for selected IP Addresses. # vim /etc/hosts.deny sshd: 192.168.0.198 # ftp: 192.168.0.197 # systemctl restart sshd Go to other machine and test the access, it will not allow you to login using SSH. # ssh root@192.168.0.164 Test access from same machine, it will allow you to login using SSH. # ssh root@localhost # exit Edit hosts.deny file to deny the access for entire network (subnet). # vim /etc/hosts.deny sshd: 192.168.0.0/24 OR sshd: 192.168.0.0/255.255.255.0 OR sshd: 192.168.0.* # systemctl restart sshd Go to other machine and test the access, it will not allow you to login using SSH. # ssh root@192.168.0.164 Test access from same machine, it will allow you to login using SSH. # ssh root@localhost # exit Edit hosts.allow file to allow the access for selected IP Addresses. # vim /etc/hosts.allow sshd: 192.168.0.198 # systemctl restart sshd Go to other machine and test the access, it will not allow you to login using SSH. # ssh root@192.168.0.164 Test access from same machine, it will allow you to login using SSH. # ssh root@localhost # exit ------------------------------------- Allow/Deny Access in For Selected IP Addresses in RHEL 8 Where TCP Wrappers Is Not Supported: # cd /etc/ssh # ls -l # vim sshd_config DenyUsers *@192.168.0.198 # systemctl restart sshd Go to other machine and test the access, it will not allow you to login using SSH. # ssh root@192.168.0.164 Test access from same machine, it will allow you to login using SSH. # ssh root@localhost # exit Allow/Deny Access in For Entire Network in RHEL 8 Where TCP Wrappers Is Not Supported: # vim sshd_config DenyUsers *@192.168.0.0/255.255.255.0 OR DenyUsers *@192.168.0.* # systemctl restart sshd Go to other machine and test the access, it will not allow you to login using SSH. # ssh root@192.168.0.164 Test access from same machine, it will allow you to login using SSH. # ssh root@localhost # exit ======================= Entries in both allow or deny: for tcp wrappers allow option will override deny entry. for sshd_config deny option will override allow entry.
@ashokyadav-eg2ub
@ashokyadav-eg2ub Жыл бұрын
Nice video
@funngyan4949
@funngyan4949 2 жыл бұрын
I learn lots from your video
@harshraj2636
@harshraj2636 2 жыл бұрын
Thank you sir. Your videos are awesome 👍
@teach_me_tech
@teach_me_tech 2 жыл бұрын
In Rhel 8 we can only allow/deny in the sshd_config file as he said tcpwrappers don't work then once the whole network is denied and we want to allow only a particular user to ssh out that network? As he said deny will override ,and in that case allow will not work for a paritcular user.Please reply.
@NehraClasses
@NehraClasses 2 жыл бұрын
I already explained it, you should defined that options which has minimum users/groups/IP Addresses in sshd_config file. For such type of scenario which you mentioned in this comment, you can only define AllowUsers option there for that particular user whom you want to give access, others users or Networks will automatically go in the deny list.
@letslearntech716
@letslearntech716 6 ай бұрын
Last me jo aapne btaya sshd config me work nhi krega toh iska hume hr ek ko mention krna pdega Right??
@uttamkumarkumar3171
@uttamkumarkumar3171 2 жыл бұрын
Good informatic vedio sirji . what is d name of kernel module supporting for tcp wrappers which isn't present in rhel8/centos8 but present in rhel7/centos7. modinfo modulename modprobe -l modulename cat /boot/config-3.x.y.z | grep -i modulename cat /boot/config-4.x.y.z | grep -i modulename. For kind info
@NehraClasses
@NehraClasses 2 жыл бұрын
TCP wrappers requires tcp_wrappers package which requires libwrap library to work, which is not supported on kernel version 4.18 or later. /boot/config-4 file is responsible for Kernel Configuration which are used during booting, while the /lib/modules/kernel-version/ directory stores all compiled drivers under Linux operating system. TCP wrappers uses network services which are dependent on other network modules. You can get the details of all available modules in /lib/modules/3.10.0-1160.el7.x86_64/modules.networking file and you can also execute man tcpd command for check all information about it.
@uttamkumarkumar3171
@uttamkumarkumar3171 2 жыл бұрын
Thank you sir for ur information
@RahulKumar-xf4tz
@RahulKumar-xf4tz Жыл бұрын
Hi, how to access linux video's Which amount I will pay u for all linux videos
@NehraClasses
@NehraClasses Жыл бұрын
You don't need to pay us anything, only join membership of our channel directly pay to KZbin
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 51 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 8 МЛН
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 17 МЛН
SSH Keys
10:12
RobEdwards
Рет қаралды 104 М.
OSI and TCP IP Models - Best Explanation
19:20
_Drunk Engineer_
Рет қаралды 307 М.
IPv6 from scratch - the very basics of IPv6 explained
14:34
OneMarcFifty
Рет қаралды 173 М.
Первый обзор Galaxy Z Fold 6
12:23
Rozetked
Рет қаралды 141 М.
PART 52 || DIY Wireless Switch forElectronic Lights - Easy Guide!
1:01
HUBAB__OFFICIAL
Рет қаралды 40 МЛН
Как правильно выключать звук на телефоне?
0:17
Люди.Идеи, общественная организация
Рет қаралды 431 М.
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 6 МЛН
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 539 М.