block ssh and ping
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
iptables -t filter -I INPUT -i eth0 -p icmp --icmp-type 8 -j DROP iptables -t filter -I INPUT -i eth0 -p tcp --dport ssh -j DROP
Quoted 7 lines · [email protected] writes:
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
Quoted 9 lines
2. I would like to block ssh to my external static IP
Howto to do that ?
Thanks
Varun
Samuel Díaz García
Director Gerente
ArcosCom Wireless, S.L.L.
mailto:[email protected]
http://www.arcoscom.com
móvil: 651 93 72 48
tlfn.: 956 70 13 15 fax: 956 70 34 83
Quoted 8 lines · --- [email protected] 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
Quoted 9 lines
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.
=====
Signature · 12 lines
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
Quoted 10 lines · On Tue, Feb 08, 2005 at 04:52:53PM +0500, [email protected] 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 ?
Out of interest - why do you specifically want to block those protocols? It's a good idea to block everything inbound and only permit what's required so I'm wondering why you want to block these two.
Signature · 1 line
Where are we going and what's with the hand basket?