Mailing List Archive


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

Re: [tlug] Blocking bad sshd bruteforce attempt



>>>>> "Hung" == Hung Vu Nguyen <vuhung16plus@example.com> writes:

    Hung> I don't worry about that because 'he' is just bruteforcing
    Hung> me. My sshd is secured /etc/hosts.allow .

# this is unlikely to work for you outof the box,
# but I only have one host per line in my hosts.allow ;-)
for i in `grep ^ssh /etc/hosts.allow | cut -b5`; do
  iptables -A INPUT -p tcp --dport ssh -s $i -j ACCEPT
done
iptables -A INPUT -p tcp --dport ssh -j REJECT



-- 
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links