Direct all traffic to Wingate web cache.

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Direct all traffic to Wingate web cache.

Postby Silver_Pharaoh » Jan 02 16 6:06 pm

Hello again guys.

Adrien, the server is still working since you fixed it so again, thank you for that!

I'm in the process of setting up the whole house to redirect all HTTP traffic to the Wingate server. I want the server to cache everything. (I thought of static routes for this)
I've tried messing around with my router's IPTABLES to forward all port 80 traffic to the server, but either it will not hit the cache (I don't see the requests counter in the HTTP Cache page increase) or I will be greeted with a "Request Denied" page from the Wingate server.

Everything works great if I setup the proxy in Windows (the other computers in the house), but I can't set a proxy server on our Android phones. That is why I want to forward everything the router gets to the web cache so that way it'll cache everything.

Network is as follows:

Modem
|
V
Router #1 -> (LAN cable) Wingate server (192.168.1.3). Also here is where 2 laptops and one android phone connects via Wi-Fi.
|
V
(Wi-Fi link)
Router #2 -> (Wi-Fi) 2 more android phones connect to this router.
|
V
Windows computers via LAN cable.


Hope this makes sense, I can clarify if need be.
Silver_Pharaoh
 
Posts: 23
Joined: Aug 14 15 2:39 pm

Re: Direct all traffic to Wingate web cache.

Postby adrien » Jan 03 16 9:55 am

Hi

when you redirect the connection to the WinGate server, do you redirect it to (e.g. the destination IP on the connection is changed / NATted to the IP of WinGate) or is it diverted VIA WinGate (destination IP doesn't change but packet is forwarded to WinGate at ethernet/MAC layer)?

If the former, then WinGate will see it as a server request, which may be rejected by default. If you can't change the forwarding properties in the router, then you could try changing the default site in the WWW proxy "web server" tab and set the action to "Proxy". In this case it checks the host header, and connects out to that host and then relays as a proxy.

If the latter, then WInGate would need to be intercepting port 80 in the proxy.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5441
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Direct all traffic to Wingate web cache.

Postby Silver_Pharaoh » Jan 03 16 12:03 pm

adrien wrote:Hi

when you redirect the connection to the WinGate server, do you redirect it to (e.g. the destination IP on the connection is changed / NATted to the IP of WinGate) or is it diverted VIA WinGate (destination IP doesn't change but packet is forwarded to WinGate at ethernet/MAC layer)?

If the former, then WinGate will see it as a server request, which may be rejected by default. If you can't change the forwarding properties in the router, then you could try changing the default site in the WWW proxy "web server" tab and set the action to "Proxy". In this case it checks the host header, and connects out to that host and then relays as a proxy.

If the latter, then WInGate would need to be intercepting port 80 in the proxy.

Regards

Adrien


Hi Adrien,

I'm not 100% on that. I'm familiar with the basics of Iptables so I'm not sure if it's modifying the packets or not. (changing the destination IP)
Using this in the router's firewall results in the Wingate server denying all of my webpage requests. (I can still use the router#2's webpage)

#!/bin/sh
PROXY_IP=192.168.1.3
PROXY_PORT=80
LAN_IP=`nvram get lan_ipaddr`
LAN_NET=$LAN_IP/`nvram get lan_netmask`

iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d $LAN_NET -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i br0 -s ! $PROXY_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT
iptables -t nat -I POSTROUTING -o br0 -s $LAN_NET -d $PROXY_IP -p tcp -j SNAT --to $LAN_IP
iptables -I FORWARD -i br0 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT

I got that from this webpage: http://www.dd-wrt.com/phpBB2/viewtopic. ... 5c4c95296d

Using this command doesn't seem to do anything however...:
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 192.168.1.3:80 (from: http://unix.stackexchange.com/questions ... es-locally )


So that's what I'm doing but I don't know if it's messing with the IP headers. Honestly, I'm just plugging things into iptables to get this to work. =/
Silver_Pharaoh
 
Posts: 23
Joined: Aug 14 15 2:39 pm

Re: Direct all traffic to Wingate web cache.

Postby Silver_Pharaoh » Jan 03 16 2:51 pm

Okay!

Setting the WWW Proxy to "Proxy" under the Web Server tab works!
The HTTP Cache now gets hit and it is storing files. Everything seems to be working fine.

Thanks again Adrien, you are the best!
Silver_Pharaoh
 
Posts: 23
Joined: Aug 14 15 2:39 pm

Re: Direct all traffic to Wingate web cache.

Postby royjm22 » Mar 29 16 12:10 am

Hi adrien can you please help me to solve my issue , the issue is client are getting error host no found if we refresh two , three time then it will go to the website ,at first instance if we try to open a website error is host not found if we try two three time then it will open the site my network scenario is like this , main DNS server , proxyserver(wingate) and VPN server all the traffic route thru proxy server and the proxy server having two network card one is connected to internal network and other connect to layer 3 router because we have fiber connect and it requires dial up PPPoE connection , layer 3 router is always connected to the internet and there is no drop please help me to sort out this issue.
royjm22
 
Posts: 21
Joined: Feb 08 16 1:08 am

Re: Direct all traffic to Wingate web cache.

Postby adrien » Mar 30 16 12:54 am

Hi Roy

I was pretty sure you had a ticket in our system, but I can't find it, can you send an email through to support@wingate.com and I can pick this up through our support desk.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5441
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Direct all traffic to Wingate web cache.

Postby royjm22 » Mar 30 16 10:35 pm

ticket opened ticket number ZRY-847-46018 please help
royjm22
 
Posts: 21
Joined: Feb 08 16 1:08 am

Re: Direct all traffic to Wingate web cache.

Postby adrien » Apr 01 16 5:51 pm

got it, thanks, let me know if you need any more assistance.
adrien
Qbik Staff
 
Posts: 5441
Joined: Sep 03 03 2:54 pm
Location: Auckland


Return to WinGate

Who is online

Users browsing this forum: No registered users and 37 guests

cron