/[smecontribs]/rpms/smeserver-coova-chilli/contribs7/smeserver-coova-chilli-0.2-iptables_insert_position.patch
ViewVC logotype

Contents of /rpms/smeserver-coova-chilli/contribs7/smeserver-coova-chilli-0.2-iptables_insert_position.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Jul 20 13:43:28 2010 UTC (14 years, 4 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-coova-chilli-0_2-20_el4_sme, smeserver-coova-chilli-0_2-17_el4_sme, smeserver-coova-chilli-0_2-18_el4_sme, smeserver-coova-chilli-0_2-19_el4_sme, HEAD
* Mon Jul 19 2010 Daniel B. <daniel@firewall-services.com> 0.2-17
- Fixes sudo env (bug only in SME8)
- Uses TCPPort squid key instead of TransparentPort so coova can
  work with dansguardian
- insert NAT rule just before the ACCEPT (PREROUTING_FROM_CHILLI)
- add transparent directive to squid (required for squid => 2.6)

1 --- smeserver-coova-chilli-0.2/root/etc/chilli/conup.sh.iptables_insert_position 2010-07-19 17:44:27.000000000 +0200
2 +++ smeserver-coova-chilli-0.2/root/etc/chilli/conup.sh 2010-07-20 10:34:16.000000000 +0200
3 @@ -5,7 +5,10 @@
4
5 if [[ $SQUID_STATUS == 'enabled' && $WEB_REQ == 'squid' ]]; then
6 SQUID_PORT=$(/sbin/e-smith/db configuration getprop squid TransparentPort)
7 - /sbin/iptables -t nat -I PREROUTING_FROM_CHILLI 4 -s $2 \
8 + # We need to insert rules just before the accept, so we'll have to compute this position
9 + POSITION=$(LANG=C iptables -t nat -L PREROUTING_FROM_CHILLI -n | \
10 + egrep -v '(Chain|target)' | grep -n ACCEPT | cut -d':' -f1)
11 + /sbin/iptables -t nat -I PREROUTING_FROM_CHILLI $POSITION -s $2 \
12 -p tcp --dport 80 -j DNAT --to $1:$SQUID_PORT
13 /sbin/iptables -I IN_FROM_CHILLI 7 -s $2 \
14 -p tcp --dport $SQUID_PORT --syn -j ACCEPT

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed