Re: block ssh and ping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- varun_saa@xxxxxxxx wrote:

> Hello,
>       My server is Mandrake 10.1
> eth0 is WAN with static IP connected to 512k DSL
> eth1 is LAN.
> 
> 1. I would like to block ping to my external static
> IP
> 
> 2. I would like to block ssh to my external static
> IP
> 
> Howto to do that ?
> 
> Thanks
> 
> Varun
> 
This is easy to block

$UNIVERSE=0.0.0.0/0
$EXTIP=[whatever external ip you have]

iptables -A INPUT -p tcp -s $UNIVERSE -d $EXTIP
--dport 22 -j REJECT
iptables -A INPUT -p ICMP -s $UNIVERSE -d $EXTIP -j
REJECT

Also check the documentation for iptables, there is a
predefine firewall and for me works ok, nevertheless I
should modify it to fit my needs.


Regards.


=====
-- 
Sergio Basurto J.

If I have seen further it is by standing on the 
shoulders of giants. (Isaac Newton)
--


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux