iptables 와ipmasqadm이용 버추얼서버 설정시 문제
일단 버추얼서버를사용하지안코 포트포워딩으로 웹서버에 포워딩해주면 아무런문제가업읍니다
문제는 로드발란스를사용하고자 NET방식으로 IPVSADM을
세팅하엿을경우 페이지는정상으로보이나 로그인해서
게시판수정을하거나 하면 로그인이팅기면서 초기페이지로넘어감니다
다른건문제가업는데 로그인해서 멀좀하려고하면 바로팅기면서 초기페이지로넘어감니다.
아래는 제 FIREWALL설정파일입니다.
보시고 문제잇는부분은 조언좀부탁드림니다
/sbin/iptables -F
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe iptable_nat
/sbin/modprobe ip_nat_ftp
echo "1" >/proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo "0" >/proc/sys/net/ipv4/conf/all/send_redirects
echo "0" >/proc/sys/net/ipv4/conf/default/send_redirects
echo "0" >/proc/sys/net/ipv4/conf/eth0/send_redirects
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/ipvsadm -A -t 218.150.xxx.xxx:80 -s rr
/sbin/ipvsadm -a -t 218.150.xxx.xxx:80 -r 192.168.0.12:80 -m
/sbin/ipvsadm -a -t 218.150.xxx.xxx:80 -r 192.168.0.13:80 -m
/sbin/ipvsadm -a -t 218.150.xxx.xxx:80 -r 192.168.0.14:80 -m
/sbin/iptables -P INPUT ACCEPT
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables -P OUTPUT ACCEPT
/sbin/iptables -t nat -P PREROUTING ACCEPT
/sbin/iptables -t nat -P POSTROUTING ACCEPT
/sbin/iptables -t nat -P OUTPUT ACCEPT
/sbin/iptables -A INPUT -p tcp -m tcp --sport 80 -j ACCEPT
/sbin/iptables -A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT
/sbin/iptables -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
/sbin/iptables -A POSTROUTING -t nat -o eth0 -j SNAT --to 218.150.xxx.xxx
/sbin/iptables -A POSTROUTING -t nat -o eth1 -j SNAT --to 192.168.0.2
위와같이 세팅하엿읍니다 그리고 아래는 아파치에러로그 에나온내용입니다
[Fri Jan 06 03:01:26 2006] [error] [client 211.247.7.136] ÃÖº¯±â±â&shop_start=14w/orion/iamges, referer: http://orioncn[Fri Jan 06 03:01:29 2006] [error] [client 211.247.7.136] File does not exist: /data/www/orion/images/bar/bar9.gif, referer: hh
ttp://orioncnc.com/index.html
[Fri Jan 06 03:06:05 2006] [error] [client 211.247.7.136] File does not exist: /data/www/orion/images/bar/bar9.gif, referer: http://orioncnc.com/index.html
[Fri Jan 06 03:11:59 2006] [error] [client 211.247.7.136] File does not exist: /data/www/orion/images/bar/bar9.gif, referer: http://orioncnc.com/index.html
[Fri Jan 06 03:23:20 2006] [error] [client 211.247.7.136] File does not exist: /data/www/orion/images/bar/bar9.gif, referer: http://orioncnc.com/index.html
[Fri Jan 06 03:33:25 2006] [error] [client 211.247.7.136] File does not exist: /data/www/orion/images/bar/bar9.gif, referer: http://orioncnc.com/index.html
댓글 달기