From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Proxy server problem
Date: Sat, 24 Aug 2013 18:25:00 +0100 [thread overview]
Message-ID: <201308241825.15336.michaelkintzios@gmail.com> (raw)
In-Reply-To: <CAN0CFw2z6=xxJzVSM3hCt9MNKVh1mGX2-eF4SrBmckZ4vmmLVg@mail.gmail.com>
[-- Attachment #1: Type: Text/Plain, Size: 2761 bytes --]
On Saturday 24 Aug 2013 14:23:26 Grant wrote:
> >> I set up squid on a remote system so I can browse the internet from
> >> that IP address. It works but it stalls frequently. I had similar
> >> results with ziproxy. I went over this with the squid list but we got
> >> nowhere as it seems to be some kind of a system or network problem.
> >>
> >> http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-3-3-5-hangs-the
> >> -en tire-system-td4660893.html
> >>
> >> Can anyone here help me figure out what is wrong? I'm not sure where to
> >> start.
> >>
> >> - Grant
> >
> > Just a quick pointer in case it applies to you: if you tunnel into the
> > proxy machine (using ssh, VPN, proxychains and what not) you would
> > suffer from packet fragmentation, which could quickly snowball. In this
> > case try reducing your mtu to lower values, than the default ethernet
> > 1500 byte packets, to cater for the overhead of the larger tunnelling
> > headers.
>
> I've tried disconnecting from my SSH tunnel and changing the mtu on my
> laptop and on the remote proxy server via ifconfig and there is some
> kind of an improvement but I can't narrow it down. I've tried mtu
> down to 1000 on both systems but the proxy server still stalls
> sometimes. Any tips for narrowing this down further?
>
> - Grant
Now that you mentioned using ssh, I don't think that you can improve this. An
mtu at 1000 bytes is lower than I thought might have helped. The problem is
caused by stacking tcp packets (tcp within tcp) each of which is using its own
timeout for failed fragments.
The problem is explained here (tcp meltdown):
http://sites.inka.de/~W1011/devel/tcp-tcp.html
and here (useful relevant references to other works are also made):
http://publications.lib.chalmers.se/records/fulltext/123799.pdf
There are some suggested solutions like increasing buffer size, but I don't
know this might work in a real world use case. You can experiment with
different buffer sizes as suggested here and see if it makes a difference:
http://www.cyberciti.biz/faq/linux-tcp-tuning/
If the interruptions are not acceptable to you, you could consider using a
different tunnel method. A network layer VPN, like IPSec (you can use
StrongSwan which also offers IKEv2 and MOBIKE for your laptop, or ipsec-tools
with racoon for IKEv1 only) should work without such problems. You will be
tunnelling tcp in udp packets. If you tunnel to your home router you will
need to configure an IPSec tunnel mode connection, otherwise you would use an
IPSec transport mode connection directly to your server after you allow IP
protocol 50 packets through your router.
HTH.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2013-08-24 17:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-24 9:47 [gentoo-user] Proxy server problem Grant
2013-08-24 10:22 ` Mick
2013-08-24 13:23 ` Grant
2013-08-24 17:25 ` Mick [this message]
2013-08-25 10:13 ` Grant
2013-08-25 11:17 ` Mick
2013-08-25 16:37 ` Grant
2013-08-25 17:10 ` Pandu Poluan
2013-08-26 6:25 ` Grant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201308241825.15336.michaelkintzios@gmail.com \
--to=michaelkintzios@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox