Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how u use the iptable firewall to restrict ssh,telnet,ftp

Answers were Sorted based on User's Feedback



how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / sins

simply use..... iptables -A INPUT -s <sourse ip or n/w u
want to block the services> -p tcp --dport <specify prt
number> -j REJECT/DROP/DENY

Is This Answer Correct ?    26 Yes 0 No

how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / rajesh dwivedi

If you restrict ssh/telnet or ftp u have to write a rule
for example u have to restrict ssh

IPTABLES -A INPUT -p tcp -s <IP Address or Domain IP> --
dport <ssh port> -j REJECT/DROP

Is This Answer Correct ?    12 Yes 0 No

how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / saurabh makkar

For SSH
iptables -A INPUT -s <sourse ip or n/w u
want to block the services> -p tcp --dport <22> -j
REJECT/DROP/DENY

For Telnet
iptables -A INPUT -s <sourse ip or n/w u
want to block the services> -p tcp --dport <23> -j
REJECT/DROP/DENY

For FTP
iptables -A INPUT -s <sourse ip or n/w u
want to block the services> -p tcp --dport <21> -j
REJECT/DROP/DENY

Is This Answer Correct ?    6 Yes 0 No

how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / srivathsan

Just a small typo to the file name, it is '/etc/hosts.deny'

Thanks,

- Vathsan.

Is This Answer Correct ?    5 Yes 2 No

how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / swapnil

if want to put on the INPUT then
iptables -A INPUT -s source -p protocol --dport destination
port -j DENY
if want to put the OUTPUT tables then
iptables -A OUTPUT -s source -p protocol --dport denation
port -j DENY

Is This Answer Correct ?    2 Yes 0 No

how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / srivathsan

Followed by iptables command mentioned by Sins to restrict
domains for various services, pleaese run
$ service iptables save
$ restorecon /etc/sysconfig/iptables.

Also, you could block the domains by adding an entry inside
/etc/hots.deny like,

sshd: <Unwanted domain url>

:qw to save changes to the file.

- Vathsan.

Is This Answer Correct ?    4 Yes 3 No

how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / nrupan mampilly

iptables -I INPUT -t filter -s source -p protocol --dport
portnumber -j REJECT

Is This Answer Correct ?    0 Yes 0 No

how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / sanjay

service iptables start
iptables on

Is This Answer Correct ?    10 Yes 12 No

how u use the iptable firewall to restrict ssh,telnet,ftp..

Answer / anil kumar pinnaka

chkconfig --level < run level for enabling the iptables > on

This will enables the ip table for the given run level.

so that these service will ge blocked.

Is This Answer Correct ?    1 Yes 15 No

Post New Answer

More Linux AllOther Interview Questions

what is memory mapped / IO mapped ? Which calls used for this to access any hardware address in linux device driver ?

3 Answers   Broadcom,


How to send automated email to a set of people at fixed time ?

3 Answers   Accenture, HP,


You want to create a compressed backup of the users' home directories. What utility should you use?

5 Answers  


What is the difference between Telnet and SSH?

17 Answers   Bayer, KTree,


in linux gui desktop icon was lost how con u back this icons

2 Answers  


how do you configure linux system as a router?

4 Answers   HCL,


how u use the iptable firewall to restrict ssh,telnet,ftp

9 Answers  


What command can you use to review boot messages?

6 Answers  


how to install linux OS? pls send step by step

3 Answers  


1 which file contains information about os wether it's 32 bit or 64 bit os 2 difference between logical block and physical block?? 3 what is the size of logical block and physical block?? 4 daemon for nfs on client end as well as server end??? 5 how to confirm from client end about nfs server sharing?? 6 what contains information about file and directory creating time or modification time??

4 Answers   Oracle,


How does the boot process[init levels] work on Linux? How is it different from Solaris?

3 Answers  


someone already asked 'what is diff between unix & Linux' can I ask the same but more nuanced...I have 7 years app support of unix, have never seen Linux BUT need to bluff my way through in an interview i e say that I have use Linux. What are the most important things I need to know?

1 Answers  


Categories