Redirect 시키는 도메인 차단

미니스@Naver의 이미지

안녕하세요.

django, apache2, ubuntu 16.04로 사이트를 운영 중 입니다. 그런데 어떤 특정 사이트에서 도메인을 제 사이트로 몇만 페이지정도 redirect 시키고 있는 것을 발견 했습니다. 의도적으로 제 사이트를 타겟으로 만들어진 스팸사이트 인듯 합니다.

아예 도메인 이하 url구조를 1:1 대응되게 redirect시켜 놓았더군요. (도메인.com/이하는 제 사이트/url 구조)

결과적으로 도메인 네임만 다른 똑같은 사이트가 만들어지게 된 것이죠.

그래서 구글 색인 감소, 순위 하락등 여러 피해를 겪고 있습니다.

일단 급하게 iptable, route그리고 아파치 SetEnvIfNoCase Referer과 aws의 waf도 설정을 해놓았습니다. 그런데 소용이 없네요.

우분투 터미널에서 host 도메인.com 해보면 ip주소가 제 서버 ip주소가 찍힙니다.
(Header에서 request url은 그 사이트의 도메인이고 remote adress는 제 사이트 입니다.)

그래서 도메인.com을 블락 시키면 제 서버 ip가 route와 iptales에서 drop 되기 때문에 소용이 없는 것 같습니다.

어떻게 차단을 해야할지 모르곘네요..

조언 부탁드립니다.

추가 : redirect인지 proxy인지 저도 판단이 잘 서지 않네요 ㅠㅠ

익명 사용자의 이미지

지금까지 상황을 들어 보면, Virtual Host 설정을 변경해서 원래 도메인으로 접속했을 때에만 사이트가 나오도록 설정을 바꾸면 될 것 같습니다.

https://httpd.apache.org/docs/2.4/ko/vhosts/examples.html

peecky의 이미지

Virtual host 설정하시고, 원치 않는 도메인으로 접속했을 때 permanent redirect 하게 해두면 검색엔진쪽에도 반영될겁니다.

<VirtualHost *:80>
	ServerName domain.com
	RedirectMatch permanent ^/(.*)$ http:// mydomain.com/$1
</VirtualHost>
 
<VirtualHost *:80>
	ServerName mydomain.com
	...
</VirtualHost>

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.