<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sébastien Wains &#187; Proxy</title>
	<atom:link href="http://www.wains.be/index.php/category/proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wains.be</link>
	<description>Linux, Open Source, VoIP and other stuff</description>
	<lastBuildDate>Tue, 07 Sep 2010 21:25:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Squid as a reverse proxy howto</title>
		<link>http://www.wains.be/index.php/2009/07/07/squid-as-a-reverse-proxy-howto/</link>
		<comments>http://www.wains.be/index.php/2009/07/07/squid-as-a-reverse-proxy-howto/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 18:27:31 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=729</guid>
		<description><![CDATA[The setup : We run a virtualization server on a server in a datacenter (for example Proxmox VE), we only have 1 public IP available. We run web servers on 2 different virtual machines inside that VM host. We want both web servers to be accessible through the public IP on port 80. We will [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The setup :</strong></p>
<p>We run a virtualization server on a server in a datacenter (for example <a href="http://pve.proxmox.com/wiki/Main_Page">Proxmox VE</a>), we only have 1 public IP available.<br />
We run web servers on 2 different virtual machines inside that VM host. We want both web servers to be accessible through the public IP on port 80.</p>
<p>We will use the Squid Proxy to act as a &#8220;reverse proxy&#8221; (<a href="http://en.wikipedia.org/wiki/Reverse_proxy">http://en.wikipedia.org/wiki/Reverse_proxy</a>).<br />
Squid will relay the requests to the destination depending on the hostname requested.</p>
<p><strong>The machines :</strong></p>
<p>Virtualization server (VM host)/Squid server : Public IP 10.20.30.40 &#8211; bridged LAN IP 172.16.5.97/255.255.0.0<br />
VM1 : bridged LAN IP 172.16.100.25/255.255.0.0 &#8211; Hostname example.org<br />
VM2 : bridged LAN IP 172.16.100.122/255.255.0.0 &#8211; Hostname example.net</p>
<p><strong>On your client computer (optional if you already have domains) :</strong></p>
<p>Edit /etc/hosts and add :</p>
<p>10.20.30.40 example.org<br />
10.20.30.40 example.net</p>
<p><strong>On VM1 and VM2 :</strong></p>
<p><code>apt-get install lighttpd (or whatever web server you like)</code></p>
<p>Edit /var/www/index.ligtthpd.html and replace the content of the file by &#8220;VM1&#8243; on VM1 and &#8220;VM2&#8243; on VM2.</p>
<p><strong>On the VM host :</strong></p>
<p>If Apache listens on port tcp/80, disable it by editing /etc/apache2/ports.conf and removing or commenting &#8220;Listen 80&#8243;.</p>
<p><em>Install Squid :</em></p>
<p><code>apt-get install squid</code></p>
<p><em>Edit /etc/squid/squid.conf and find the http_port section, and add &#8220;http_port 80 vhost vport&#8221; :</em></p>
<p><code>http_port 3128<br />
http_port 80 vhost vport</code></p>
<p><em>Then add the following section :</em></p>
<p><code>cache_peer 172.16.100.25 parent 80 0 no-query originserver name=server1<br />
cache_peer_domain server1 example.org<br />
cache_peer 172.16.100.122 parent 80 0 no-query originserver name=server2<br />
cache_peer_domain server2 example.net</code></p>
<p><em>And then add the following ACL for our domains :</em></p>
<p><code>acl valid_domains dstdomain .example.org<br />
acl valid_domains dstdomain .example.net</code></p>
<p><em>Allow requests to our domains by adding &#8220;http_access allow valid_domains&#8221; just before the &#8220;deny all&#8221; rule (at the end of ACL&#8217;s) :</em></p>
<p><code>http_access allow valid_domains<br />
http_access deny all</code></p>
<p>Restart Squid :</p>
<p><code>/etc/init.d/squid restart</code></p>
<p><strong>Back on your computer :</strong></p>
<p>Make a request on example.net or .org, you should either see VM1 or VM2 displayed in your browser depending on the hostname requested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2009/07/07/squid-as-a-reverse-proxy-howto/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Squid 2.6 : transparent proxy</title>
		<link>http://www.wains.be/index.php/2007/10/27/squid-26-transparent-proxy/</link>
		<comments>http://www.wains.be/index.php/2007/10/27/squid-26-transparent-proxy/#comments</comments>
		<pubDate>Sat, 27 Oct 2007 15:39:20 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>

		<guid isPermaLink="false">http://www.wains.be/index.php/2007/10/27/squid-26-transparent-proxy/</guid>
		<description><![CDATA[I was explaining in this article how to enable the transparent proxy feature under Squid 2.5. The following options required for transparent proxy are no longer available under Squid 2.6 : httpd_accel_host virtual httpd_accel_port 80 httpd_accel_with_proxy on httpd_accel_uses_host_header on The new option under Squid 2.6 is the much simpler : http_port 8080 transparent You just [...]]]></description>
			<content:encoded><![CDATA[<p>I was explaining <a href="http://www.wains.be/index.php/2006/12/18/transparent-squid/">in this article</a> how to enable the transparent proxy feature under Squid 2.5.</p>
<p>The following options required for transparent proxy are no longer available under Squid 2.6 :</p>
<p><code>httpd_accel_host virtual<br />
httpd_accel_port 80<br />
httpd_accel_with_proxy on<br />
httpd_accel_uses_host_header on </code></p>
<p>The new option under Squid 2.6 is the much simpler :</p>
<p><code>http_port 8080 transparent</code></p>
<p>You just need to append &#8220;transparent&#8221; to the http_port option line.</p>
<p>If you upgrade to Squid 2.6 and don&#8217;t update your config file you should get the following in the logs :</p>
<p><code>messages:Oct 27 13:02:08 x squid: parseConfigFile: line 51 unrecognized: 'httpd_accel_host virtual'<br />
messages:Oct 27 13:02:08 x squid: parseConfigFile: line 52 unrecognized: 'httpd_accel_port 80'<br />
messages:Oct 27 13:02:08 x squid: parseConfigFile: line 53 unrecognized: 'httpd_accel_with_proxy on'<br />
messages:Oct 27 13:02:08 x squid: parseConfigFile: line 54 unrecognized: 'httpd_accel_uses_host_header on' </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2007/10/27/squid-26-transparent-proxy/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Squid cache manager error : socket: (13) Permission denied</title>
		<link>http://www.wains.be/index.php/2007/07/12/squid-cache-manager-error-socket-13-permission-denied/</link>
		<comments>http://www.wains.be/index.php/2007/07/12/squid-cache-manager-error-socket-13-permission-denied/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 12:58:36 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.wains.be/index.php/2007/07/12/squid-cache-manager-error-socket-13-permission-denied/</guid>
		<description><![CDATA[If you get the error socket: (13) Permission denied while trying to connect to the cache manager of Squid using cachemgr.cgi, it probably means SElinux is enabled and is preventing cgi files from making TCP connections. Quick and dirty fix : disabling SElinux Edit /etc/sysconfig/selinux Change the value SELINUX to &#8220;disabled&#8221; Clean fix : make [...]]]></description>
			<content:encoded><![CDATA[<p>If you get the error </p>
<p><code>socket: (13) Permission denied</code></p>
<p>while trying to connect to the cache manager of Squid using cachemgr.cgi, it probably means SElinux is enabled and is preventing cgi files from making TCP connections.</p>
<p><strong>Quick and dirty fix : disabling SElinux</strong></p>
<p>Edit /etc/sysconfig/selinux</p>
<p>Change the value SELINUX to &#8220;disabled&#8221;</p>
<p><strong>Clean fix : make a rule in SElinux to allow the connection</strong></p>
<p>I don&#8217;t know much about SElinux yet, so if someone feels like pointing me to the right direction or submitting something, it is welcomed <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2007/07/12/squid-cache-manager-error-socket-13-permission-denied/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Blocking Internet Explorer with the Squid Web proxy</title>
		<link>http://www.wains.be/index.php/2007/06/07/blocking-internet-explorer-with-the-squid-web-proxy/</link>
		<comments>http://www.wains.be/index.php/2007/06/07/blocking-internet-explorer-with-the-squid-web-proxy/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 21:31:53 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>

		<guid isPermaLink="false">http://www.wains.be/index.php/2007/06/07/blocking-internet-explorer-with-the-squid-web-proxy/</guid>
		<description><![CDATA[This is my own way of blocking Internet Explorer : /etc/squid/squid.conf : ### We want to block IE, but some sites (grr) are only working under IE ### so we put up a list of safe URL for Internet Explorer in the following file acl safe_url_for_IE url_regex -i "/etc/squid/ACL/safe_url" ### The ACL for the IE [...]]]></description>
			<content:encoded><![CDATA[<p>This is my own way of blocking Internet Explorer :</p>
<p>/etc/squid/squid.conf :</p>
<pre><code>### We want to block IE, but some sites (grr) are only working under IE
### so we put up a list of safe URL for Internet Explorer in the following file
acl safe_url_for_IE            url_regex -i            "/etc/squid/ACL/safe_url"

### The ACL for the IE user-agent
acl internet_explorer browser MSIE

### The world
acl all         src 0.0.0.0/0.0.0.0

### Our network
acl intranet        src 192.168.1.0/24

### Let's say we still want a machine in the network to use IE
### (like a guest users not having an alternative web browser installed)
### I'm personally allowing IE for the dynamic DHCP clients at work
acl ie_allowed       src 192.168.1.100/32

### First, we are allowing the IE-machine here
http_access allow ie_allowed internet_explorer

### Secondly, we are denying Internet Explorer,
### except for the "safe URL" list that is still allowed.
http_access deny internet_explorer !safe_url_for_IE

### Now, after the restrictions, we are allowing our network.
http_access allow intranet

### And finally blocking the rest of the world.
http_access deny all</code></pre>
<p>The safe URL ACL file (/etc/squid/ACL/safe_url) looks like this :</p>
<p><code>http://.*\.site1.be/.*</p>
<p>http://.*\.site2.be/.*</p>
<p>http://.*\.site3.be/.*</code></p>
<p>If you have any useful tips or rules, please share ! <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2007/06/07/blocking-internet-explorer-with-the-squid-web-proxy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CentOS/RHEL : Web Proxy + Antivirus (ClamAV)</title>
		<link>http://www.wains.be/index.php/2006/12/19/centosrhelfedora-web-proxy-antivirus-clamav/</link>
		<comments>http://www.wains.be/index.php/2006/12/19/centosrhelfedora-web-proxy-antivirus-clamav/#comments</comments>
		<pubDate>Tue, 19 Dec 2006 21:47:55 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Red Hat/CentOS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=174</guid>
		<description><![CDATA[I&#8217;ll explain here how to setup a web proxy with antivirus capabilities. We will use these tools : Squid + ClamAV + a patched version of DansGuardian The clamav packages provided are now outdated, I&#8217;m going to build an updated version as soon as I can Squid : www.squid-cache.org ClamAV : www.clamav.net DansGuardian : dansguardian.org [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll explain here how to setup a web proxy with antivirus capabilities.</p>
<p>We will use these tools : Squid + ClamAV + a patched version of DansGuardian</p>
<p><strong>The clamav packages provided are now outdated, I&#8217;m going to build an updated version as soon as I can</strong></p>
<p><span id="more-174"></span></p>
<p>Squid : <a href="http://www.squid-cache.org">www.squid-cache.org</a><br />
ClamAV : <a href="http://www.clamav.net">www.clamav.net</a><br />
DansGuardian : <a href="http://dansguardian.org">dansguardian.org</a><br />
DansGuardian Antivirus plugin : <a href="http://http://www.harvest.com.br/asp/afn/dg.nsf">http://www.harvest.com.br/asp/afn/dg.nsf</a></p>
<p>You can download squid from the default CentOS repository.<br />
I&#8217;ll consider you already have a functional squid server.</p>
<p><strong>The requirements for squid are :</strong><br />
- it should listen on port 3128<br />
- it should only allow requests from localhost</p>
<p>/etc/squid/squid.conf :<br />
<code>http_port 3128<br />
acl localhost src 127.0.0.0/255.0.0.0<br />
http_access allow localhost<br />
http_access deny all</code><br />
<strong><br />
Install DansGuardian with the antivirus plugin from SecurityTeam.us repo :</p>
<p>Install the SecurityTeamUS repo :</strong><br />
<code>rpm -ihv http://repo.securityteam.us/repository/redhat/securityteamus-repo-latest.rpm</code></p>
<p><strong>Install DansGuardian-av and its dependencies (included on SecurityTeamUS) :</strong></p>
<p><code><strong>yum install dansguardian-av</strong></code></p>
<p>Output :<br />
<code>Setting up Install Process<br />
Setting up repositories<br />
SecurityTeamUS            100% |=========================|  951 B    00:00<br />
Reading repository metadata in from local files<br />
primary.xml.gz            100% |=========================|  30 kB    00:00<br />
SecurityTe: ################################################## 68/68<br />
Added 68 new packages, deleted 0 old in 0.88 seconds<br />
Parsing package install arguments<br />
Resolving Dependencies<br />
--&gt; Populating transaction set with selected packages. Please wait.<br />
---&gt; Downloading header for dansguardian-av to pack into transaction set.<br />
dansguardian-av-2.8.0.6-1 100% |=========================|  24 kB    00:00<br />
---&gt; Package dansguardian-av.i386 0:2.8.0.6-1 set to be updated<br />
--&gt; Running transaction check<br />
--&gt; Processing Dependency: libclamav.so.1 for package: dansguardian-av<br />
--&gt; Processing Dependency: clamd for package: dansguardian-av<br />
--&gt; Processing Dependency: libesmtp.so.5 for package: dansguardian-av<br />
--&gt; Processing Dependency: libesmtp for package: dansguardian-av<br />
--&gt; Processing Dependency: clamav for package: dansguardian-av<br />
--&gt; Restarting Dependency Resolution with new changes.<br />
--&gt; Populating transaction set with selected packages. Please wait.<br />
---&gt; Downloading header for libesmtp to pack into transaction set.<br />
libesmtp-0.8.12-1.i386.rp 100% |=========================| 4.9 kB    00:00<br />
---&gt; Package libesmtp.i386 0:0.8.12-1 set to be updated<br />
---&gt; Downloading header for clamd to pack into transaction set.<br />
clamd-0.88.7-1.i386.rpm   100% |=========================| 4.7 kB    00:00<br />
---&gt; Package clamd.i386 0:0.88.7-1 set to be updated<br />
---&gt; Downloading header for clamav to pack into transaction set.<br />
clamav-0.88.7-1.i386.rpm  100% |=========================| 7.4 kB    00:00<br />
---&gt; Package clamav.i386 0:0.88.7-1 set to be updated<br />
--&gt; Running transaction check<br />
--&gt; Processing Dependency: clamav-db = 0.88.7-1 for package: clamav<br />
--&gt; Restarting Dependency Resolution with new changes.<br />
--&gt; Populating transaction set with selected packages. Please wait.<br />
---&gt; Downloading header for clamav-db to pack into transaction set.<br />
clamav-db-0.88.7-1.i386.r 100% |=========================| 2.6 kB    00:00<br />
---&gt; Package clamav-db.i386 0:0.88.7-1 set to be updated<br />
--&gt; Running transaction check<br />
.<br />
Dependencies Resolved<br />
.<br />
=============================================================================<br />
 Package                 Arch       Version          Repository        Size<br />
=============================================================================<br />
Installing:<br />
 dansguardian-av         i386       2.8.0.6-1        SecurityTeamUS    309 k<br />
Installing for dependencies:<br />
 clamav                  i386       0.88.7-1         SecurityTeamUS    944 k<br />
 clamav-db               i386       0.88.7-1         SecurityTeamUS    7.3 M<br />
 clamd                   i386       0.88.7-1         SecurityTeamUS     64 k<br />
 libesmtp                i386       0.8.12-1         SecurityTeamUS    176 k<br />
.<br />
Transaction Summary<br />
=============================================================================<br />
Install      5 Package(s)<br />
Update       0 Package(s)<br />
Remove       0 Package(s)<br />
Total download size: 8.8 M<br />
Is this ok [y/N]: y</code><br />
.<br />
<strong>Start ClamAV daemon :</strong><br />
<code>service clamd start</code></p>
<p>By default, clamd should listen on 127.0.0.1:3310</p>
<p><strong>Set up DansGuardian-av this way :</strong><br />
<code>reportinglevel = 3<br />
languagedir = '/etc/dansguardian/languages'<br />
language = 'ukenglish'<br />
loglevel = 3<br />
logexceptionhits = on<br />
logfileformat = 1<br />
loglocation = '/var/log/dansguardian/access.log'<br />
filterip =<br />
filterport = 8080<br />
proxyip = 127.0.0.1<br />
proxyport = 3128<br />
nonstandarddelimiter = on<br />
usecustombannedimage = 1<br />
custombannedimagefile = '/etc/dansguardian/transparent1x1.gif'<br />
filtergroups = 1<br />
filtergroupslist = '/etc/dansguardian/filtergroupslist'<br />
bannediplist = '/etc/dansguardian/bannediplist'<br />
exceptioniplist = '/etc/dansguardian/exceptioniplist'<br />
banneduserlist = '/etc/dansguardian/banneduserlist'<br />
exceptionuserlist = '/etc/dansguardian/exceptionuserlist'<br />
showweightedfound = on<br />
weightedphrasemode = 0<br />
urlcachenumber = 3000<br />
urlcacheage = 900<br />
phrasefiltermode = 2<br />
preservecase = 0<br />
hexdecodecontent = 0<br />
forcequicksearch = 0<br />
reverseaddresslookups = off<br />
reverseclientiplookups = off<br />
createlistcachefiles = on<br />
maxuploadsize = -1<br />
maxcontentfiltersize = 256<br />
usernameidmethodproxyauth = on<br />
usernameidmethodident = off<br />
preemptivebanning = on<br />
forwardedfor = off<br />
usexforwardedfor = off<br />
logconnectionhandlingerrors = on<br />
maxchildren = 120<br />
minchildren = 8<br />
minsparechildren = 4<br />
preforkchildren = 6<br />
maxsparechildren = 32<br />
maxagechildren = 500<br />
ipcfilename = '/tmp/.dguardianipc'<br />
urlipcfilename = '/tmp/.dguardianurlipc'<br />
pidfilename = '/var/run/dansguardian.pid'<br />
nodaemon = off<br />
nologger = off<br />
daemonuser = 'nobody'<br />
daemongroup = 'nobody'<br />
softrestart = off<br />
virusscan = on<br />
virusengine = 'clamav'<br />
tricklelength = 32768<br />
forkscanlength = 32768<br />
firsttrickledelay = 10<br />
followingtrickledelay = 10<br />
maxcontentscansize = 41904304<br />
virusscanexceptions = on<br />
urlcachecleanonly = on<br />
virusscannertimeout = 60<br />
notify = 2 # will notify the admin only<br />
emaildomain = 'domain.be'<br />
postmaster = 'admin@domain.be'<br />
emailserver = '127.0.0.1:25'<br />
downloaddir = '/tmp/dgvirus'<br />
clmaxfiles = 1500<br />
clmaxreclevel = 3<br />
clmaxfilesize = 10485760<br />
clblockencryptedarchives = off<br />
cldetectbroken = off<br />
clamdsocket = '127.0.0.1:3310'</code></p>
<p>This is my configuration, please review it to match your needs</p>
<p><strong>Make sure dansguardian will start at boot :</strong><br />
<code>chkconfig dansguardian on</code></p>
<p><strong>Start DansGuardian :</strong><br />
<code>service dansguardian start</code></p>
<p>Now, you can set up your browser preference to use the antivirus web proxy (IP:8080)</p>
<p><strong>If you want to set dansguardian as a transparent proxy :</strong><br />
1. Edit /etc/squid/squid.conf and add :<br />
<code>httpd_accel_host virtual<br />
httpd_accel_port 80<br />
httpd_accel_with_proxy on<br />
httpd_accel_uses_host_header on</code></p>
<p>2. Type this at the command prompt (where your local subnet is 10.0.0.0/24 and your LAN interface is eth0) :<br />
<code>iptables -t nat -A PREROUTING -i eth0 -s 10.0.0.0/24 -p tcp --dport 80 -j REDIRECT --to-port 8080</code></p>
<p>3. Save your iptables configuration, type :<br />
<code>iptables-save &gt; /etc/sysconfig/iptables</code></p>
<p><strong>Squid logs can be tailed here :</strong><br />
tail -f /var/log/squid/access.log</p>
<p><strong>DansGuardian logs can be tailed here :</strong><br />
tail -f /var/log/dansguardian/access.log</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2006/12/19/centosrhelfedora-web-proxy-antivirus-clamav/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Transparent Squid proxy</title>
		<link>http://www.wains.be/index.php/2006/12/18/transparent-squid/</link>
		<comments>http://www.wains.be/index.php/2006/12/18/transparent-squid/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 17:40:23 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=173</guid>
		<description><![CDATA[How to run squid as a transparent squid proxy : Squid 2.5 and earlier : Edit /etc/squid/squid.conf and add this : httpd_accel_host virtual httpd_accel_port 80 httpd_accel_with_proxy on httpd_accel_uses_host_header on To enable the transparent proxying, type this : iptables -t nat -A PREROUTING -i eth0 -s 192.168.1.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128 &#8220;-s [...]]]></description>
			<content:encoded><![CDATA[<p>How to run squid as a transparent squid proxy :</p>
<p><strong>Squid 2.5 and earlier :</strong></p>
<p>Edit /etc/squid/squid.conf and add this :</p>
<p><code>httpd_accel_host virtual<br />
httpd_accel_port 80<br />
httpd_accel_with_proxy on<br />
httpd_accel_uses_host_header on</code></p>
<p><span id="more-173"></span></p>
<p>To enable the transparent proxying, type this :</p>
<p><code>iptables -t nat -A PREROUTING -i eth0 -s 192.168.1.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128</code></p>
<p>&#8220;-s 192.168.1.0/24&#8243; is optional but needed if you run a webserver on the squid machine. The web visitor request would be piped in squid without it.</p>
<p><strong>Squid 2.6 and later :</strong></p>
<p><a href="http://www.wains.be/index.php/2007/10/27/squid-26-transparent-proxy/">http://www.wains.be/index.php/2007/10/27/squid-26-transparent-proxy/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2006/12/18/transparent-squid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Squid : log Google and other search engines related queries</title>
		<link>http://www.wains.be/index.php/2006/12/18/squid-log-google-and-other-queries/</link>
		<comments>http://www.wains.be/index.php/2006/12/18/squid-log-google-and-other-queries/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 17:34:23 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=172</guid>
		<description><![CDATA[By default, the queries sent to google and other search engines are not logged into Squid proxy logs. This is meant to protect the user&#8217;s privacy. See below how to enable queries logging.. Add this to /etc/squid/squid.conf strip_query_terms off As a result, you&#8217;d get this in the logs : 1166463218.353 1285 192.168.1.10 TCP_MISS/200 6429 GET [...]]]></description>
			<content:encoded><![CDATA[<p>By default, the queries sent to google and other search engines are not logged into Squid proxy logs. This is meant to protect the user&#8217;s privacy.</p>
<p>See below how to enable queries logging..</p>
<p><span id="more-172"></span></p>
<p>Add this to /etc/squid/squid.conf</p>
<p><code>strip_query_terms off</code></p>
<p>As a result, you&#8217;d get this in the logs :<br />
<code>1166463218.353   1285 192.168.1.10 TCP_MISS/200 6429 GET http://www.google.com/search?hl=en&amp;q=s%C3%A9bastien+wains&amp;btnG=Google+Search - DIRECT/64.233.161.104 text/html</code></p>
<p>Instead of this :</p>
<p><code>1166463218.353   1285 192.168.1.10 TCP_MISS/200 6429 GET http://www.google.com - DIRECT/64.233.161.104 text/html</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2006/12/18/squid-log-google-and-other-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Block MSN and other messengers on your network</title>
		<link>http://www.wains.be/index.php/2006/05/16/block-msn-and-other-messengers-on-your-network/</link>
		<comments>http://www.wains.be/index.php/2006/05/16/block-msn-and-other-messengers-on-your-network/#comments</comments>
		<pubDate>Tue, 16 May 2006 09:03:34 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Iptables]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=91</guid>
		<description><![CDATA[1. Iptables This is my iptables config stored under /etc/sysconfig/iptables : (eth0 = WAN interface, eth1 = LAN interface) You&#8217;ll notice 192.168.1.16 is allowed to connect to any services You&#8217;ll also notice that the default stance for output traffic is ACCEPT. You can of course set it to DROP and only accept what you specifically [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1. Iptables</strong></p>
<p>This is my iptables config stored under /etc/sysconfig/iptables :<br />
(eth0 = WAN interface, eth1 = LAN interface)</p>
<p>You&#8217;ll notice 192.168.1.16 is allowed to connect to any services</p>
<p>You&#8217;ll also notice that the default stance for output traffic is ACCEPT.<br />
You can of course set it to DROP and only accept what you specifically define.</p>
<pre><code>*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]

# Basic protections against syn floods and other stuff
-A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
-A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT
-A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT

# Block MSN
-I FORWARD -s 192.168.1.0/24 -p tcp -m tcp --dport 1863 -j DROP
-I FORWARD -s 192.168.1.0/24 -p tcp -m tcp --dport 1863 -j LOG --log-prefix "MESSENGER MSN &gt; "
-I FORWARD -s 192.168.1.16 -p tcp -m tcp --dport 1863 -j ACCEPT

# Block AIM/ICQ
-I FORWARD -s 192.168.1.0/24 -d 64.12.25.0/22 -j DROP
-I FORWARD -s 192.168.1.0/24 -d 64.12.25.0/22 -j LOG --log-prefix "MESSENGER ICQ/AIM &gt; "
-I FORWARD -s 192.168.1.16 -d 64.12.25.0/22 -j ACCEPT

# Block Yahoo IM
-I FORWARD -s 192.168.1.0/24 -d 216.155.193.0/22 -j DROP
-I FORWARD -s 192.168.1.0/24 -d 216.155.193.0/22 -j LOG --log-prefix "MESSENGER YIM &gt; "
-I FORWARD -s 192.168.1.16 -d 216.155.193.0/22 -j ACCEPT

# Allowing anything else
-A FORWARD -i eth1 -o eth0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT</code></pre>
<p>As soon as the MSN client is not able to connect to the server on port tcp 1863, it&#8217;ll try to connect using port tcp 80, which is probably allowed :</p>
<p>Web activity upon connection :<br />
<code>1.10         gateway.messenger.hotmail.com/gateway/gateway.dll?Action=open&amp;Server=NS&amp;IP=messenger.hotmail.com<br />
1.10         207.46.25.15/gateway/gateway.dll?SessionID=1047611159.2422<br />
1.10         207.46.25.15/gateway/gateway.dll?SessionID=1047611159.1885<br />
1.10         207.46.25.15/gateway/gateway.dll?Action=poll&amp;SessionID=1047611159.24447<br />
1.10         207.46.25.15/gateway/gateway.dll?SessionID=1047611159.7573</code></p>
<p><strong>2. More firewall rules or Squid web proxy </strong></p>
<p>Now you have two choices :</p>
<p>- making an ACL blocking the microsoft IP ranges&#8230; if new ranges are made available, MSN clients would be able to connect again.. this is not an ideal stance, unless you enjoy tracking the IP of MSN servers.</p>
<p>- blocking Internet Explorer (and MSN which uses the Internet Explorer engine) in your web proxy : you&#8217;ll need to run a transparent web proxy (Squid does the job pretty well) to block Internet Explorer, so MSN won&#8217;t be able to connect to port 80&#8230; See <a href="http://www.wains.be/index.php/2007/06/07/blocking-internet-explorer-with-the-squid-web-proxy/">here for a short howto</a></p>
<p>Of course, you&#8217;d need something like <a href="http://www.mozilla.com">Firefox</a> installed on your client PC&#8217;s if you decide to block IE&#8230; you can always make an ACL in Squid allowing safe websites under Internet Explorer&#8230; This is not a bad stance as IE is known to have many unfixed security flaws.</p>
<p><code>Edit june 2007 : I'm blocking the Internet Explorer User Agent which apparently blocks the MSN client as well, but I noticed this <a href="http://www.hypothetic.org/docs/msn/general/http_connections.php">page</a> mentions the user agent for MSN is "MSMSGS". Please let me know if the described solution does not work for you.</code></p>
<p>I&#8217;ve not put much efforts into blocking AIM/ICQ/YIM since 99 % of people use MSN in Belgium<br />
The MSN blocking is working well for me, I&#8217;m not sure about the other IM&#8217;s (the IP ranges can change from times to times)</p>
<p><strong>3. Additional notes</strong></p>
<p>It is reported at many places that the following squid rules are working.. <strong>I have tried them and they do NOT work for me..</strong> If they do for you, let me know <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':)' class='wp-smiley' /><br />
<code>acl mi_intranet src 192.168.1.0/255.255.255.0<br />
acl msn req_mime_type -i ^application/x-msn-messenger<br />
http_access deny mi_intranet msn<br />
http_access allow mi_intranet </code></p>
<p>This is a working Squid ACL blocking a bunch of web messenger :<br />
<code>http://.*e-messenger.net/.*</p>
<p>http://193\.238\.160\.*</p>
<p>http://.*meebo.com/.*</p>
<p>http://.*messenger.msn.com/.*</p>
<p>http://.*clientless.net/.*</p>
<p>http://.*wbmsn.net/.*</p>
<p>http://.*msn2go.com/.*</p>
<p>http://64\.92\.173\.*</p>
<p>http://.*iloveim.com/.*</p>
<p>http://info.sytes.net/.*</p>
<p>http://chatenabled.mail.google.com/.*</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2006/05/16/block-msn-and-other-messengers-on-your-network/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Block viruses and protect yourself from spammers by blocking port 25 under Linux + iptables (just like ISP&#8217;s do !)</title>
		<link>http://www.wains.be/index.php/2006/05/11/block-forwarding-on-port-tcp-25-under-iptables/</link>
		<comments>http://www.wains.be/index.php/2006/05/11/block-forwarding-on-port-tcp-25-under-iptables/#comments</comments>
		<pubDate>Wed, 10 May 2006 23:13:01 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Iptables]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=88</guid>
		<description><![CDATA[Find out viruses on your network and prevent spammers from abusing your wireless network ! With simple iptables rulesets&#8230; OK, let&#8217;s calm down, this needs a bit of explanation before proceeding. ISP&#8217;s usually block port 25 : Unlike many ISP&#8217;s, mine doesn&#8217;t ! They still allow customers to send emails directly through and to any [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Find out viruses on your network and prevent spammers from abusing your wireless network ! With simple iptables rulesets&#8230;</strong></p>
<p>OK, let&#8217;s calm down, this needs a bit of explanation before proceeding.</p>
<p><strong>ISP&#8217;s usually block port 25 :</strong><br />
Unlike many ISP&#8217;s, mine doesn&#8217;t ! They still allow customers to send emails directly through and to any SMTP servers (tcp/25).</p>
<p>The goal in blocking port 25 is to block viruses from spreading around by sending emails using their own SMTP daemon.<br />
At work, by just reading our email server logs, I know which ISP&#8217;s aren&#8217;t blocking port TCP/25  (damn Wanadoo and Road Runner).</p>
<p>If your ISP blocks port TCP/25, you need to send emails through their own (usually overwhelmed) SMTP server.</p>
<p><strong>Worst case scenario :</strong><br />
Let&#8217;s say someone breaks into my wireless network with a linux laptop (pretty unlikely with WPA2 security but who knows <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':)' class='wp-smiley' />  ), the attacker would be able to send as much spam as one would like using a local sendmail or postfix server.</p>
<p>To fill that breach, we need to block port tcp/25 for wireless clients.</p>
<p><span id="more-88"></span></p>
<p><strong>The iptables answer :</strong></p>
<p>Basically my linux gateway does this :</p>
<pre><code>eth0 --- WAN
eth1 --- LAN (192.168.1.0/24)
eth2 --- WLAN (192.168.2.0/24)

Iptables default filter stance :
INPUT DROP
FORWARD DROP
OUTPUT ACCEPT</code></pre>
<p>The rules to add to the gateway (must come first before any other FORWARD rule) :<br />
<code>iptables -A FORWARD -i eth2 -o eth0 -p tcp -m tcp --destination-port 25 -j DROP<br />
iptables -A FORWARD -i eth0 -o eth2 -p tcp -m tcp --source-port 25 -j DROP</code></p>
<p>If you want to still allow access to a specific server (your ISP ?), you&#8217;d just need to do this :<br />
<code>iptables -A FORWARD -i eth2 -o eth0 -p tcp -m tcp -d ! ALLOWED_IP --destination-port 25 -j DROP<br />
iptables -A FORWARD -i eth0 -o eth2 -p tcp -m tcp -s ! ALLOWED_IP --source-port 25 -j DROP</code></p>
<p>Personally, I filter MAC addresses and only allow one IP for wifi under iptables :<br />
<code>-A FORWARD -i eth2 -o eth0 -p tcp -m tcp --destination-port 25 -j DROP<br />
-A FORWARD -i eth0 -o eth2 -p tcp -m tcp --source-port 25 -j DROP<br />
-A FORWARD -i eth2 -o eth0 -s 192.168.2.xx -m mac --mac-source 00:02:2D:xx:xx:xx -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT<br />
-A FORWARD -i eth2 -o eth0 -s 192.168.2.xx -m mac --mac-source 00:06:25:xx:xx:xx -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT<br />
-A FORWARD -i eth0 -o eth2 -d 192.168.2.xx -m state --state ESTABLISHED,RELATED -j ACCEPT</code></p>
<p>For MAC filtering to be really useful, you should run arpwatch along which would send you an alert if the system finds out weird activity going on with MAC addresses : <a href="http://ee.lbl.gov/">http://ee.lbl.gov/</a></p>
<p>As a security measure, you would also prohibit access to the linux gateway SMTP server (and trying to set it up properly as well) :<br />
<code>iptables -A INPUT -i eth2 -p tcp -m tcp --dport 25 -j DROP</code></p>
<p>Blocking port 25 data forward under a wired business network could be useful, it could block potential viruses on client machines (who said PC&#8217;s running Windows ?) from sending emails out, you can even log the illegal activity on port 25 so you can detect any virus presence on the network.</p>
<p>To enable activity logging, use this ruleset :<br />
<code>-A FORWARD -i eth2 -o eth0 -p tcp -m tcp --destination-port 25 -j DROP<br />
-A FORWARD -i eth0 -o eth2 -p tcp -m tcp --source-port 25 -j LOG --log-prefix "Illegal port 25 &gt; "<br />
-A FORWARD -i eth0 -o eth2 -p tcp -m tcp --source-port 25 -j DROP</code></p>
<p>Log output :<br />
<code>May 11 11:29:51 localhost kernel: Illegal port 25 &gt; IN=eth2 OUT=eth0 SRC=192.168.2.xx DST=195.238.5.128 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=29159 DF PROTO=TCP SPT=53827 DPT=25 WINDOW=5840 RES=0x00 SYN URGP=0<br />
May 11 11:30:10 localhost kernel: Illegal port 25 &gt; IN=eth2 OUT=eth0 SRC=192.168.2.xx DST=195.238.5.128 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=41524 DF PROTO=TCP SPT=53829 DPT=25 WINDOW=5840 RES=0x00 SYN URGP=0<br />
May 11 11:30:13 localhost kernel: Illegal port 25 &gt; IN=eth2 OUT=eth0 SRC=192.168.2.xx DST=195.238.5.128 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=41526 DF PROTO=TCP SPT=53829 DPT=25 WINDOW=5840 RES=0x00 SYN URGP=0 </code></p>
<p>If you want to generate a daily report of port 25 (ab)use, this is a quick bash script : </p>
<p><code>#!/bin/sh<br />
DATE="$(date --date "1 day ago" +"%b %e")"<br />
echo "Illegal traffic accross the network"<br />
echo "Date : $DATE"<br />
echo "==========================================="<br />
echo " "<br />
echo "Port 25 (virus, local smtp server,...)"<br />
/bin/cat /var/log/messages | grep "Illegal port 25" | grep "${DATE}" | \<br />
awk '{print $1" "$2" "$3" &gt; "$12" - "$13}'<br />
echo " "</code></p>
<p>The report looks like this :</p>
<pre><code>Illegal traffic accross the network
Date : May 11
===========================================

Port 25 (virus, local smtp server,...)
May 11 11:29:51 &gt; SRC=192.168.254.xx - DST=195.238.5.128
May 11 11:30:10 &gt; SRC=192.168.254.xx - DST=195.238.5.128
May 11 11:30:13 &gt; SRC=192.168.254.xx - DST=195.238.5.128</code></pre>
<p>As a security measure, please consider switching your wireless network to WPA or WPA2.<br />
Indeed, it is so easy to crack a WEP network and circumvent MAC filters and absence of a DHCP server.</p>
<p>Setting up a transparent web proxy can also help finding out weird activity coming from computers on the network. Some viruses attempt to download stuff from the web at specific time of the day. That&#8217;s how I noticed one computer on a network was always trying to access some weird site, every night at 3am. </p>
<p>For that matter, I recommend using Squid + DansGuardian + ClamAV :<br />
<a href="http://www.wains.be/index.php/2006/12/18/transparent-squid/">http://www.wains.be/index.php/2006/12/18/transparent-squid/</a><br />
<a href="http://www.wains.be/index.php/2006/12/19/centosrhelfedora-web-proxy-antivirus-clamav/">http://www.wains.be/index.php/2006/12/19/centosrhelfedora-web-proxy-antivirus-clamav/</a></p>
<p>I hope you&#8217;ll find this guide useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2006/05/11/block-forwarding-on-port-tcp-25-under-iptables/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>HOWTO : Setting up a transparent FTP proxy using frox</title>
		<link>http://www.wains.be/index.php/2005/11/18/howto-setting-up-a-transparent-ftp-proxy-using-frox-and-proftpd/</link>
		<comments>http://www.wains.be/index.php/2005/11/18/howto-setting-up-a-transparent-ftp-proxy-using-frox-and-proftpd/#comments</comments>
		<pubDate>Fri, 18 Nov 2005 19:01:29 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Running a transparent FTP proxy is an easy way to control FTP connections made by people on your network (using ACL&#8217;s) If you are already running Squid as a transparent (web) proxy, it cannot act as a transparent FTP proxy along, thus you have to use another tool for FTP proxying : frox will do [...]]]></description>
			<content:encoded><![CDATA[<p>Running a transparent FTP proxy is an easy way to control FTP connections made by people on your network (using ACL&#8217;s)<br />
If you are already running Squid as a transparent (web) proxy, it cannot act as a transparent FTP proxy along, thus you have to use another tool for FTP proxying : frox will do the job</p>
<p><span id="more-46"></span></p>
<p><strong>Installation &#038; compilation</strong></p>
<p>Grab the latest version of Frox at <a href="http://frox.sourceforge.net/">http://frox.sourceforge.net/</a><br />
Compile the package the usual way..</p>
<p>The following files should be installed :</p>
<p>/etc/frox.conf<br />
/usr/local/sbin/frox<br />
/var/log/frox/frox-log<br />
/var/run/frox.pid</p>
<p><strong>/etc/frox.conf :</strong><br />
<code>Listen 192.168.0.1<br />
Port 2121<br />
BindToDevice eth1 &lt; -- depends on your config, should be the LAN NIC<br />
ResolvLoadHack wontresolve.doesntexist.abc<br />
User nobody<br />
Group nobody<br />
WorkingDir /usr/local/bin<br />
DontChroot Yes<br />
LogLevel 20<br />
LogFile /var/log/frox/frox-log<br />
XferLogging yes<br />
PidFile /var/run/frox.pid<br />
BounceDefend yes<br />
PassivePorts 49152-65534<br />
MaxForks 10<br />
MaxForksPerHost 4<br />
### Allow rules first, deny rules next<br />
ACL Allow 192.168.0.2/255.255.255.255 - * 21 &lt;-- this will allow 192.168.0.2 to access ANY FTP server (internal AND external)<br />
ACL Allow 192.168.0.3/255.255.255.255 - 193.190.198.20 21 &lt;-- this will allow 192.168.0.3 to access ftp.belnet.be server<br />
ACL Allow 192.168.0.4/255.255.255.255 - 192.168.0.1 21 &lt;-- this will allow 192.168.0.4 to access the internal server<br />
ACL Deny 192.168.254.0/255.255.255.0 - * 21 &lt;-- this will block anything else from the subdomain</code></p>
<p><strong>Redhat/Fedora/CentOS init script</strong></p>
<p>I made a pretty short init script to start frox as a service on RedHat based machines</p>
<p>Save the following script under <strong>/etc/init.d/frox :</strong><br />
</code><code>### /etc/init.d/frox ###<br />
#!/bin/bash<br />
#<br />
# Init file for frox (transparent ftp proxy)<br />
#<br />
# chkconfig: 345 96 50<br />
# description: frox<br />
FROX_BIN=/usr/local/sbin/frox<br />
FROX_CONF=/etc/frox.conf<br />
FROX_LOG=/var/log/frox/frox-log<br />
FROX_PID=/var/run/frox.pid<br />
case "$1" in<br />
'start')<br />
echo "Starting Frox...";<br />
$FROX_BIN -f $FROX_CONF<br />
;;<br />
'stop')<br />
echo "Stopping Frox...";<br />
if [ -f $FROX_PID ]; then<br />
kill `cat $FROX_PID`<br />
rm $FROX_PID<br />
else<br />
echo "Frox not running";<br />
fi<br />
;;<br />
'help')<br />
echo "Usage: $0 { start | stop }"<br />
exit 1<br />
;;<br />
esac<br />
exit 0<br />
### EOF ###</code></p>
<p>Type :<br />
<code>chkconfig --add /etc/init.d/frox<br />
service frox start</code></p>
<p>Frox should start</p>
<p><strong>Iptables configuration</strong></p>
<p>Add the following line to /etc/sysconfig/iptables under NAT section<br />
Anyone under 192.168.0.0/24 trying to access port 21 will be transparently redirected to frox, which will allow or deny the connection<br />
<code>-A PREROUTING -s 192.168.0.0/24 -p tcp -m tcp --dport 21 -j REDIRECT --to-ports 2121</code></p>
<p>Type : <code>service iptables restart</code></p>
<p>Test your configuration</p>
<p>Telnet into your frox server and check out the logs using :<br />
<code>tail -f /var/log/frox/frox-log</code></p>
<p>If you want to lock down iptables, you'll run into problems : see <a href="http://www.wains.be/?p=81">http://www.wains.be/?p=81</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2005/11/18/howto-setting-up-a-transparent-ftp-proxy-using-frox-and-proftpd/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>
