[질문] 인터넷 공유시 리다이렉트 문제

Zeroidle의 이미지

리눅스 박스로 인터넷 공유를 하고있습니다.

eth0에는 인터넷 회선이

eth1에는 클라이언트들이 묶여있는 허브가 물려있습니다.

squid를 사용하면서 80번 포트만 리다이렉트를 하고싶은데요

iptables -D PREROUTING -t nat -p tcp -i eth1 --dport 80 -j REDIRECT --to-port 3128

이렇게 하는게 맞는지요?

이렇게 하니 squid에서 에러가납니다.

답변 부탁드리겠습니다.

pynoos의 이미지

누가 error 메시지를 어떻게 내는지를 올려주세요.

kall의 이미지

검색하다보니 같은 문제가 2년전에 있었군요 ;;
브라우저에 이런 에러메세지가 뜹니다.

Quote:
ERROR
The requested URL could not be retrieved
--------------------------------------------------------------------------------
While trying to retrieve the URL: /

The following error was encountered:

  • Invalid URL
Some aspect of the requested URL is incorrect. Possible problems:
  • Missing or incorrect access protocol (should be `http://'' or similar)
  • Missing hostname
  • Illegal double-escape in the URL-Path
  • Illegal character in hostname; underscores are not allowed
Your cache administrator is webmaster.
--------------------------------------------------------------------------------
[/][/]

----
자신을 이길 수 있는자는
무슨짓이든 할수있다..
즉..무서운 넘이란 말이지 ^-_-^
나? 아직 멀었지 ㅠㅠ

kall의 이미지

자답이군요..;; (구글만세)

http://www.squid-cache.org/mail-archive/squid-users/200109/0770.html

/sbin/iptables -t nat -A PREROUTING -d 0/0 -i gre0 -p tcp --dport 80 -j REDIRECT --to-port 3128 ip_gre 모듈 안올려도 잘 되는군요 ;;;

----
자신을 이길 수 있는자는
무슨짓이든 할수있다..
즉..무서운 넘이란 말이지 ^-_-^
나? 아직 멀었지 ㅠㅠ