From owner-freebsd-net@FreeBSD.ORG Fri Dec 19 11:32:46 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F0B01065674 for ; Fri, 19 Dec 2008 11:32:46 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.182]) by mx1.freebsd.org (Postfix) with ESMTP id DDA548FC14 for ; Fri, 19 Dec 2008 11:32:45 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by ik-out-1112.google.com with SMTP id c21so216220ika.3 for ; Fri, 19 Dec 2008 03:32:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer; bh=a5loq03xQChfUL5n0+yVGQfFaE2Zk81+q8NPsAxHRy4=; b=pxszNnDdLyC+xdVJaf/6JGdmyI3pBpr/TLPOe2pPTBMCG8Ff2liWLkA21zlh/Zeh0E igQz7xt2J1QRJiSLPM7w4tjNvMGKwWg4/gshGbTXK/NdMJAH4dg4Up5ZX+Au3gTDNd8s /la2cq5D1ivKVF4tKTKkGVcuNwVXhL2XCYr8w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer; b=iw07tS4lSy3P5fdF1Y/yfvVMImhNOZIWc4tXrNV7cF6z8ioiit/3S7Z59YVGqufDaP gW0hlvdPaLPHdLi73r90KcD/xw4++0/Hk8UbV6xIyassdh8JAEvi5RaqNt3xgPpz1hVO SWB5ytu68TQbolEYXc6THRR3pnq6/ObCztBU0= Received: by 10.210.10.8 with SMTP id 8mr2242562ebj.53.1229686364626; Fri, 19 Dec 2008 03:32:44 -0800 (PST) Received: from ?127.0.0.1? (87-194-39-182.bethere.co.uk [87.194.39.182]) by mx.google.com with ESMTPS id m5sm5979137gve.3.2008.12.19.03.32.42 (version=SSLv3 cipher=RC4-MD5); Fri, 19 Dec 2008 03:32:43 -0800 (PST) From: Tom Evans To: Lazar Szilard In-Reply-To: <20081219100959.8838.qmail@server16.citromail.hu> References: <20081219100959.8838.qmail@server16.citromail.hu> Content-Type: multipart/mixed; boundary="=-Oy45P75YK18JawH6wdym" Date: Fri, 19 Dec 2008 11:33:09 +0000 Message-Id: <1229686389.41849.19.camel@strangepork.mintel.co.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: proxy X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 11:32:46 -0000 --=-Oy45P75YK18JawH6wdym Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2008-12-19 at 11:09 +0100, Lazar Szilard wrote: > hi, > > > > I have a beginner quieston. > > I use FreeBSD 7.1-RC1 without X on my notebook. > > How can I configure my network to > > 1. use proxy to http or ftp connections (proxy address: (10.0.1.1:8080) > > or (on another place, with stong restrictions, but port 22 is open) > > 2. use ssh tunnel (in windows I've used socks5 proxy trough my server: ssh -D 7777 user@host.tld) > > > > where can I set these settings? > > best regards, > > indul > > To use a proxy with most applications, it is simply necessary to set the appropriate environment variables. Eg, I have a squid proxy running on the server 'proxy', port 3128, so I put the following in my .bashrc: export HTTP_PROXY=proxy:3128 export http_proxy=http://proxy:3128/ export ftp_proxy=http://proxy:3128/ To use an ssh tunnel, you already have the command right there.. I use a tiny rc script to manage my ssh tunnels, it is attached. Put in /usr/local/etc/rc.d and add the following settings to /etc/rc.conf proxy_tunnel_enable="YES" proxy_tunnel_remote_user="someone@somehost" You should also set up passwordless ssh authentication for root to the user@host you wish to use for proxying to, and then simply change your local users proxy settings. --=-Oy45P75YK18JawH6wdym--