방화벽에서 Mac 어드레스로 차단을 했는데여....

ksh5485의 이미지

운영하는 서버에 SSH Brute 공격이 들어와서 처음에는 해당 ip주소를 차단했는데

로그를보니까 맥어드레스는 같고 차단하면 ip주소를 바꿔서 계속 공격이 들어오더군여...

messages 로그를 보면 MAC=xx:xx:xx:xx:xx:xx:00:05:31:44:30:0a:08:00 이렇게 로그가 남습니다

앞에 x는 서버의 맥어드레스 주소구여... (근데 맥어드레스는 16진수 6자리 아닌가여?? 근데 뒷부분은 8자리네여...)

우선 맥주소를 서버의 방화벽에서 다음과 같이 차단을 했습니다

-p tcp -m tcp --dport 22 --syn -m mac --mac-source 00-05-31-44-30-0A -j DROP

위에 로그에서 앞의 6자리를 차단을 했습니다...

차단후에 로그를 보면 더이상 차단한 맥어드레스에서는 접속을 하지 않는데

저 맥어드레스가 아닌 다른 맥어드레스에서 접속이 안되네여... (접속이 안되는 맥어드레스 : 00-00-f0-97-6f-c0)

방화벽의 저 부분을 삭제하면 정상적으로 접속이 됩니다... 그외 다른 맥주소에서도 정상 접속이 안됩니다...

어떤 부분이 잘 못 됬을까요...?? 저 공격때문에 계속 서버가 죽는거 같은데...

frenzy의 이미지

맥주소가 게이트웨이의 맥주소 아닐까요 ?

같은 네트워크에서는 맥주소로 해당 패킷들을 차단할 수 있지만, 외부 네트워크에서 들어오는 패킷의 경우 맥주소로 막을 수는 없을 것 같습니다.
+
++++++++++++++++++++++++++++++++++++++++++++++
혼자놀기의 도사가 되리라... http://geeklife.co.kr

.
++++++++++++++++++++++++++++++++++++++++++++++
혼자놀기의 도사가 되리라... http://geeklife.co.kr

ksh5485의 이미지

위의 맥주소로 들어오는 ip들을 조회해 보면 국가가 모두 다르네요...(외국)
차단한 맥주소가 아닌 다른 맥주소로 접속이 안된다는 사람들은 국내에서 접속을 하는거구요...
근복적으로 막을수 있는 방법이 없을까요...?? 맥주소로 차단이 안된다면 ip를 계속 바꿔서 들어오기 때문에
ip를 차단하는것으로는 막을수가 없는데...

ymir의 이미지

sshd 포트를 변경하는 것도 방법이 될 수 있겠고...
특정 IP 에서만 22 번 포트로의 접속을 허용하고 나머지는 차단하는 것도 방법이 될 수 있습니다.

되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』

되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.