* [LARTC] Two internet lines and squid problem.
@ 2005-08-18 12:45 Stanislav Nedelchev
2005-08-19 3:09 ` gypsy
0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Nedelchev @ 2005-08-18 12:45 UTC (permalink / raw)
To: lartc
I have 2 internet connections and i;m trying to use squid as transparent proxy
but every time squid is using first internet line but i want to use
second internet line .
i have this settings and without squid it's working
i have default route on the first internet connection.
iptables -t nat -I POSTROUTING -o eth2 -p tcp --dport 80 -s
192.168.0.0/24 -d ! 192.168.0.0/16 -j SNAT --to 217.10.248.135
/sbin/ip route add default via 217.10.248.135 dev eth2 table natips
/sbin/ip rule add fwmark 66 table natips
iptables -t mangle -I PREROUTING -i eth1 -p tcp --dport 80 -j MARK
--set-mark 66
iptables -t mangle -A FORWARD -i eth1 -p tcp --dport 80 -j MARK --set-mark 66
I try to solve the problem moving squid to onother computer and i add
additional rules like
/sbin/ip route add default via 217.10.248.135 dev eth2 table natips
/sbin/ip route add default via 192.168.0.11 dev eth1 table squid
/sbin/ip route flush cache
/sbin/ip rule add fwmark 67 table squid
/sbin/ip rule add fwmark 66 table natips
iptables -t mangle -I PREROUTING -i eth1 -p tcp -s 192.168.0.11
--dport 80 -j MARK --set-mark 66
iptables -t mangle -I PREROUTING -i eth1 -p tcp -d ! 192.168.0.11
--dport 80 -j MARK --set-mark 67
iptables -t mangle -A FOWARD -i eth1 -s 192.168.0.11 -p tcp --dport
80 -j MARK --set-mark 66
iptables -t mangle -A FORWARD -i eth1 -p tcp -s ! 192.168.0.11
--dport 80 -j MARK --set-mark 67
iptables -t nat -I POSTROUTING -o eth2 -p tcp --dport 80 -s
192.168.0.0/24 -d ! 192.168.0.0/16 -j SNAT --to 217.10.248.135
in this case web traffic is working but pages that uses SSL like gmail.com
is not working
can anybody help me to use squid like transparent proxy with 2
internet connection and to use second one.
Thank in advance.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] Two internet lines and squid problem.
2005-08-18 12:45 [LARTC] Two internet lines and squid problem Stanislav Nedelchev
@ 2005-08-19 3:09 ` gypsy
0 siblings, 0 replies; 2+ messages in thread
From: gypsy @ 2005-08-19 3:09 UTC (permalink / raw)
To: lartc
Stanislav Nedelchev wrote:
>
> I have 2 internet connections and i;m trying to use squid as transparent proxy
> but every time squid is using first internet line but i want to use
> second internet line .
> i have this settings and without squid it's working
> i have default route on the first internet connection.
> iptables -t nat -I POSTROUTING -o eth2 -p tcp --dport 80 -s
> 192.168.0.0/24 -d ! 192.168.0.0/16 -j SNAT --to 217.10.248.135
> /sbin/ip route add default via 217.10.248.135 dev eth2 table natips
> /sbin/ip rule add fwmark 66 table natips
>
> iptables -t mangle -I PREROUTING -i eth1 -p tcp --dport 80 -j MARK
> --set-mark 66
>
> iptables -t mangle -A FORWARD -i eth1 -p tcp --dport 80 -j MARK --set-mark 66
>
> I try to solve the problem moving squid to onother computer and i add
> additional rules like
> /sbin/ip route add default via 217.10.248.135 dev eth2 table natips
> /sbin/ip route add default via 192.168.0.11 dev eth1 table squid
> /sbin/ip route flush cache
> /sbin/ip rule add fwmark 67 table squid
> /sbin/ip rule add fwmark 66 table natips
>
> iptables -t mangle -I PREROUTING -i eth1 -p tcp -s 192.168.0.11
> --dport 80 -j MARK --set-mark 66
> iptables -t mangle -I PREROUTING -i eth1 -p tcp -d ! 192.168.0.11
> --dport 80 -j MARK --set-mark 67
>
> iptables -t mangle -A FOWARD -i eth1 -s 192.168.0.11 -p tcp --dport
> 80 -j MARK --set-mark 66
> iptables -t mangle -A FORWARD -i eth1 -p tcp -s ! 192.168.0.11
> --dport 80 -j MARK --set-mark 67
> iptables -t nat -I POSTROUTING -o eth2 -p tcp --dport 80 -s
> 192.168.0.0/24 -d ! 192.168.0.0/16 -j SNAT --to 217.10.248.135
> in this case web traffic is working but pages that uses SSL like gmail.com
> is not working
> can anybody help me to use squid like transparent proxy with 2
> internet connection and to use second one.
> Thank in advance.
I don't know anything at all about squid, but I recall a posting here
regarding HTB and squid where the poster suggested a patch for squid.
You might want to google "lartc squid patch" and see if there is
anything that helps. You might also want to google lists.netfilter.org.
--
gypsy
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-19 3:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18 12:45 [LARTC] Two internet lines and squid problem Stanislav Nedelchev
2005-08-19 3:09 ` gypsy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.