Linux / UNIX Tech Support Forum
This is a discussion on block ssh to remote user within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Hi, I am root and i dont want anybody access me via SSH service remotly. How can i do that? ...
|
|||||||
| Networking, Firewalls and Security No it's not a secret. Talk about firewalls and security issues. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
| Sponsored Links | ||
|
|
|
||||
|
Firewall usually blocks access using IPs or state and other conditions. Under Fedora Linux open /etc/sysconfig/iptables file and find out line with port 22 with ACCEPT action. Change this to DROP or REJECT:
Code:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j REJECT Code:
service iptables restart Code:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -s ! 192.168.1.0/24 -j REJECT Restrict ssh access using tcpd (TCPWrapper)
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Thanks,
Its working.I just want to allow only two ip for accessing root through ssh service. Quote:
|
![]() |
| Tags |
| iptables , linux , port 22 , ssh |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| howto block mail service for a user | ephdia | Databases servers | 0 | 17-07-2008 10:26 AM |
| How to Block Ultrasurf | laluvirtual | Linux software | 9 | 15-06-2008 04:21 PM |
| Add normal user / FTP user usein NORMAL user(non-root) | anilvrathod | Shell scripting | 0 | 07-12-2007 06:04 PM |
| Block Single User Login using root password | sayan4u86 | Networking, Firewalls and Security | 0 | 28-09-2007 06:47 AM |
| Iptables block ip address | raj | Getting started tutorials | 0 | 05-05-2007 01:01 AM |