OpenVZ Forum


Home » General » Support » Squid on OpenVZ CentsOs container (networking issue)
Squid on OpenVZ CentsOs container [message #39559] Tue, 11 May 2010 11:59 Go to previous message
rsclmumbai is currently offline  rsclmumbai
Messages: 2
Registered: May 2010
Junior Member
Hello,

A friend a has setup my first OpenVZ server on CentOS 5.4
One container is created using centos-5 template.
I then installed squid in the VM.

My ifconfig looks like this:
[root@vps-101-gw-LL ~]# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1364 (1.3 KiB)  TX bytes:1364 (1.3 KiB)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:226 errors:0 dropped:0 overruns:0 frame:0
          TX packets:229 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:20076 (19.6 KiB)  TX bytes:41658 (40.6 KiB)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.1.23  P-t-P:192.168.1.23  Bcast:192.168.1.23  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1



I have added the following 2 lines in my rc.local:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i venet0 -p tcp --dport 80 -j REDIRECT --to-port 8080


The problem is here:
When a client PC's browser tries to access any website, I get "PAGE CANNOT BE DISPLAYED" error. Requests do not reach squid.

If I setup proxy setting in the browser as 192.168.1.23:80 then the requests reach squid and the pages are served well.

I am unable to understand why should I have to define PROXY settings in browser. Standard browser requests are sent to port 80 anyways, which should reach squid.

Note: in browser's proxy setting, the PORT is set to 80. Not 3128.

Any pointers or ideas are appreciated.

Thx
Sans
 
Read Message
Read Message
Previous Topic: VETH and bridging
Next Topic: ufw support in OpenVZ ubuntu container.
Goto Forum:
  


Current Time: Wed Aug 14 17:21:30 GMT 2024

Total time taken to generate the page: 0.02724 seconds