From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: Re: [PATCH] New addon: Portredirect 1.0 Date: Fri, 06 Aug 2021 17:57:53 +0200 Message-ID: In-Reply-To: <147F4AEF-0264-4B59-AB39-D87B68883D17@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3184939463331168533==" List-Id: --===============3184939463331168533== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Am Donnerstag, dem 05.08.2021 um 22:33 +0200 schrieb Michael Tremer: > Hello, >=20 > > On 3 Aug 2021, at 18:04, Jon Murphy wrote: > >=20 > > Hello all! > >=20 > > I=E2=80=99m having trouble following the changes to firewall.cgi.=C2=A0 I= think > > there were 4 or 5 patches=20 > > submitted to the Dev Mailing List. > >=20 > > Did these get approved? >=20 > That is a good question. AFAIK they are not in c159. >=20 > >=20 > > I looked at the Changelog for Core 158 and core 159 (testing) but I > > didn=E2=80=99t see anything: > >=20 > > https://nightly.ipfire.org/core158/2021-07-21%2015:47:35%20+0000-23498c61= /x86_64/changelog.txt > >=20 > > https://nightly.ipfire.org/master/latest/x86_64/changelog.txt > >=20 > >=20 > > Can they be added to CU 159? > >=20 > > To be honest I am mainly interested in the DNS redirect (and its > > cousin NTP redirect). > >=20 > > I=E2=80=99d be happy to help test but I do need some help applying the > > patches.=C2=A0=20 > > Right now I apply them by grabbing a copy of firewall.cgi and > > manually deleting and then manually adding a patch. > > Not the smartest way but it works (if I don=E2=80=99t screw-up and make a > > mistake!). >=20 > @Stefan: What is the status on this? All firewall related patches, pending on the list, safely can be merged and tested by a bigger group of testers. - Stefan >=20 > -Michael >=20 > > Jon > >=20 > > > On Jun 30, 2021, at 2:14 PM, Stefan Schantl < > > > stefan.schantl(a)ipfire.org> wrote: > > >=20 > > > Hello Matthias, Hello Michael, Hello Jon, Hello *, > > >=20 > > > I've followed the conversation on this list since the first mail > > > and > > > thoughts about forcing DNS traffic to use the local resolver. > > >=20 > > > It was a very long journey and lot of time and work has been > > > spent to > > > get to the present point. > > >=20 > > > As Michael requested here, I've digged through the lines of the > > > perl > > > script which is responsible for creating the firewall rules and > > > surprisingly found that everyting which is needed to create > > > generic > > > REDIRECT rules already was written in the past - it just did not > > > work > > > as designed/expected. > > >=20 > > > Finaly I was able to adjust these lines of code and to repair > > > that > > > feature. > > >=20 > > > A redirect rule can be created by picking a single host or group > > > of > > > hosts or entire network(s) as source, selecting NAT (DNAT) and > > > choosing > > > the Firewall itself as target. > > >=20 > > > The protocol or service or service group which should be > > > redirected has > > > to be selected afterwards. If you want to redirect a given port > > > to > > > another one it can be specified as "Target port". > > >=20 > > > All created redirect rules are displayed as "input rules". > > >=20 > > >=20 > > > The patch directly can be accessed here: > > >=20 > > > https://patchwork.ipfire.org/project/ipfire/patch/20210630184031.7726-1= -stefan.schantl(a)ipfire.org/ > > >=20 > > > Best regards, > > >=20 > > > -Stefan > > >=20 > > > > Hello, > > > >=20 > > > > > On 28 Jun 2021, at 18:53, Jon Murphy > > > > > wrote: > > > > >=20 > > > > > Hi Michael!=C2=A0 Happy Monday! > > > > >=20 > > > > >=20 > > > > > > Why do we not extend the firewall UI probably by about 20 > > > > > > lines > > > > > > of code instead of adding many hundreds of lines? > > > > > >=20 > > > > > > Please can someone elaborate on this more? > > > > >=20 > > > > > Doing a DNS redirect, via the WegBUI, has been an issue since > > > > > 2015.=C2=A0 I found this quote in the old forum: > > > > >=20 > > > > > "Having investigated a bit more I have concluded that it's > > > > > not > > > > > currently possible to create such rules through the WUI. > > > > >=20 > > > > > There are a number of obstacles: > > > > > 1. It is not allowed to create a rule where source IP and > > > > > destination nat IP is on the same subnetwork (e.g. GREEN), > > > > > WUI > > > > > error message: "Source and destination IP addresses are from > > > > > the > > > > > same subnet." > > > > >=20 > > > > > 2. WUI will not allow you to create a rule without a > > > > > destination > > > > > (the filtered packet must adhere to a destination, not only a > > > > > port) > > > > > and the destination MUST be an IP address of one of the > > > > > IPFire > > > > > interfaces, which limits whats possible a great deal."=20 > > > >=20 > > > > And these cannot be changed? > > > >=20 > > > > > And I found this from 2016: > > > > > https://bugzilla.ipfire.org/show_bug.cgi?id=3D11168 > > > > >=20 > > > > > So I am guessing that no one has been able to determine a way > > > > > to > > > > > extend the WebGUI.=C2=A0=20 > > > >=20 > > > > Has anyone tried? I do not see any obvious reasons why this > > > > should > > > > not be possible. > > > >=20 > > > > > I am curious - Who created the=20 > > > > > https://ipfire:444/cgi-bin/firewall.cgi=C2=A0page?=C2=A0 And could = they > > > > > help? > > > >=20 > > > > -Michael > > > >=20 > > > > > Jon > > > > >=20 > > > > >=20 > > > > > > On Jun 28, 2021, at 11:04 AM, Michael Tremer < > > > > > > michael.tremer(a)ipfire.org> wrote: > > > > > >=20 > > > > > > Hello Matthias, > > > > > >=20 > > > > > > > On 27 Jun 2021, at 14:48, Matthias Fischer < > > > > > > > matthias.fischer(a)ipfire.org> wrote: > > > > > > >=20 > > > > > > > From: Marcel Lorenz > > > > > >=20 > > > > > > Thank you for sending this patch on Marcel=E2=80=99s behalf, but I > > > > > > would > > > > > > much more prefer if he would submit his patches on his own. > > > > > > I do > > > > > > not see why that isn=E2=80=99t possible. > > > > > >=20 > > > > > > > Please note: > > > > > > > This is a new addon written by Marcel Lorenz < > > > > > > > marcel.lorenz(a)ipfire.org>. > > > > > > >=20 > > > > > > > It adds a new GUI to IPFire for DNS/NTP *and* user > > > > > > > specific > > > > > > > port redirections. > > > > > > >=20 > > > > > > > How its working: > > > > > > > It has exactly the same functionalities as "Forcing > > > > > > > DNS/NTP..."=C2=A0 - and some more. > > > > > > >=20 > > > > > > > By setting switches, DNS/NTP requests are automatically > > > > > > > redirected to the local IPFire DNS/NTP servers. > > > > > > >=20 > > > > > > > Additionally, the user can specify custom redirections. > > > > > > >=20 > > > > > > > These rules are added to a new chain in PREROUTING =3D> > > > > > > > PORT_REDIRECT. > > > > > > >=20 > > > > > > > To avoid problems with (e.g.) transparent 'squid' > > > > > > > configurations, > > > > > > > redirection rules are added automatically before existing > > > > > > > 'squid' rules. > > > > > >=20 > > > > > > This message does unfortunately not say why this add-on > > > > > > would be > > > > > > useful. I am emphasising this again and again that it is > > > > > > not very > > > > > > important how something is done specially. That should be > > > > > > commented in the code and other implementation details > > > > > > should > > > > > > also be documented there. > > > > > >=20 > > > > > > As I have stated on this functionality many times before, I > > > > > > do > > > > > > not see why this is necessary at all. > > > > > >=20 > > > > > > Why is this an add-on? > > > > > >=20 > > > > > > Why do we not extend the firewall UI probably by about 20 > > > > > > lines > > > > > > of code instead of adding many hundreds of lines? > > > > > >=20 > > > > > > Please can someone elaborate on this more? > > > > > >=20 > > > > > > -Michael > > > > > >=20 > > > > > > > Signed-off-by: Matthias Fischer < > > > > > > > matthias.fischer(a)ipfire.org> > > > > > > > --- > > > > > > > config/portredir/EX-portredir.menu=C2=A0=C2=A0=C2=A0 |=C2=A0=C2= =A0 6 + > > > > > > > config/portredir/lang/portredir.de.pl |=C2=A0 19 + > > > > > > > config/portredir/lang/portredir.en.pl |=C2=A0 19 + > > > > > > > config/portredir/portredir-backup=C2=A0=C2=A0=C2=A0=C2=A0 |=C2= =A0=C2=A0 1 + > > > > > > > config/portredir/portredir.cgi=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 | 525 > > > > > > > ++++++++++++++++++++++++++ > > > > > > > config/rootfiles/common/misc-progs=C2=A0=C2=A0=C2=A0 |=C2=A0=C2= =A0 1 + > > > > > > > config/rootfiles/packages/portredir=C2=A0=C2=A0 |=C2=A0 11 + > > > > > > > lfs/portredir=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 |=C2=A0 85 +++++ > > > > > > > make.sh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 1 + > > > > > > > src/initscripts/packages/portredir=C2=A0=C2=A0=C2=A0 | 191 ++++= ++++++ > > > > > > > src/misc-progs/Makefile=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 2 +- > > > > > > > src/misc-progs/portredirctrl.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 |=C2=A0 47 +++ > > > > > > > src/paks/portredir/install.sh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0 32 ++ > > > > > > > src/paks/portredir/uninstall.sh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0 28 ++ > > > > > > > src/paks/portredir/update.sh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 |=C2=A0 26 ++ > > > > > > > 15 files changed, 993 insertions(+), 1 deletion(-) > > > > > > > create mode 100644 config/portredir/EX-portredir.menu > > > > > > > create mode 100644 config/portredir/lang/portredir.de.pl > > > > > > > create mode 100644 config/portredir/lang/portredir.en.pl > > > > > > > create mode 100644 config/portredir/portredir-backup > > > > > > > create mode 100644 config/portredir/portredir.cgi > > > > > > > create mode 100644 config/rootfiles/packages/portredir > > > > > > > create mode 100644 lfs/portredir > > > > > > > create mode 100644 src/initscripts/packages/portredir > > > > > > > create mode 100644 src/misc-progs/portredirctrl.c > > > > > > > create mode 100644 src/paks/portredir/install.sh > > > > > > > create mode 100644 src/paks/portredir/uninstall.sh > > > > > > > create mode 100644 src/paks/portredir/update.sh > > > > > > >=20 > > > > > > > diff --git a/config/portredir/EX-portredir.menu > > > > > > > b/config/portredir/EX-portredir.menu > > > > > > > new file mode 100644 > > > > > > > index 000000000..8376e8053 > > > > > > > --- /dev/null > > > > > > > +++ b/config/portredir/EX-portredir.menu > > > > > > > @@ -0,0 +1,6 @@ > > > > > > > +=C2=A0=C2=A0=C2=A0 $subfirewall->{'95.portredir'} =3D { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'caption' =3D> > > > > > > > $Lang::tr{'portredir port redirections'}, > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'uri' =3D> '/cgi- > > > > > > > bin/portredir.cgi', > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'title' =3D> > > > > > > > "$Lang::tr{'portredir port redirections'}", > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'enabled' =3D> 1 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }; > > > > > > > diff --git a/config/portredir/lang/portredir.de.pl > > > > > > > b/config/portredir/lang/portredir.de.pl > > > > > > > new file mode 100644 > > > > > > > index 000000000..b932d4a85 > > > > > > > --- /dev/null > > > > > > > +++ b/config/portredir/lang/portredir.de.pl > > > > > > > @@ -0,0 +1,19 @@ > > > > > > > +%tr =3D ( > > > > > > > +%tr, > > > > > > > +'portredir enable addon' =3D> 'Addon aktivieren', > > > > > > > +'portredir common settings' =3D> 'Allgemeine > > > > > > > Einstellungen', > > > > > > > +'portredir port redirections' =3D> 'Portumleitungen', > > > > > > > +'portredir fw for interface' =3D> 'Firewalloptionen f=C3=BCr > > > > > > > das > > > > > > > Interface', > > > > > > > +'portredir enable user redirections' =3D> 'Aktiviere > > > > > > > benutzerdefinierte Portumleitungen', > > > > > > > +'portredir force local dns' =3D> 'Erzwinge lokale DNS- > > > > > > > Server', > > > > > > > +'portredir force local ntp' =3D> 'Erzwinge lokale NTP- > > > > > > > Server', > > > > > > > +'portredir custom redirections' =3D> 'Benutzerdefinierte > > > > > > > Portumleitungen', > > > > > > > +'portredir remove rule' =3D> 'Entferne Regel', > > > > > > > +'portredir add rule' =3D> 'Hinzuf=C3=BCgen', > > > > > > > +'portredir no entries' =3D> 'Keine Eintr=C3=A4ge vorhanden.', > > > > > > > +'portredir invalid address' =3D> 'Ung=C3=BCltige Host- > > > > > > > Addresse.', > > > > > > > +'portredir empty input' =3D> 'Fehlende Angabe: Bitte geben > > > > > > > Sie > > > > > > > einen g=C3=BCltigen Host an.', > > > > > > > +'portredir save to activate' =3D> 'Speichern, um > > > > > > > =C3=84nderungen zu > > > > > > > aktivieren', > > > > > > > +); > > > > > > > + > > > > > > > +#EOF > > > > > > > diff --git a/config/portredir/lang/portredir.en.pl > > > > > > > b/config/portredir/lang/portredir.en.pl > > > > > > > new file mode 100644 > > > > > > > index 000000000..f442f3eaa > > > > > > > --- /dev/null > > > > > > > +++ b/config/portredir/lang/portredir.en.pl > > > > > > > @@ -0,0 +1,19 @@ > > > > > > > +%tr =3D ( > > > > > > > +%tr, > > > > > > > +'portredir enable addon' =3D> 'Enable addon', > > > > > > > +'portredir common settings' =3D> 'Common settings', > > > > > > > +'portredir port redirections' =3D> 'Port redirections', > > > > > > > +'portredir fw for interface' =3D> 'Firewall options for > > > > > > > interface', > > > > > > > +'portredir enable user redirections' =3D> 'Enable user > > > > > > > port > > > > > > > redirections', > > > > > > > +'portredir force local dns' =3D> 'Enforce local DNS > > > > > > > servers', > > > > > > > +'portredir force local ntp' =3D> 'Enforce local NTP > > > > > > > servers', > > > > > > > +'portredir custom redirections' =3D> 'Custom port > > > > > > > redirections', > > > > > > > +'portredir remove rule' =3D> 'Remove rule', > > > > > > > +'portredir add rule' =3D> 'Add new', > > > > > > > +'portredir no entries' =3D> 'No entries at the moment.', > > > > > > > +'portredir invalid address' =3D> 'Invalid host address.', > > > > > > > +'portredir empty input' =3D> 'Empty input: Please enter a > > > > > > > valid > > > > > > > host.', > > > > > > > +'portredir save to activate' =3D> 'Save to activate > > > > > > > changes', > > > > > > > +); > > > > > > > + > > > > > > > +#EOF > > > > > > > diff --git a/config/portredir/portredir-backup > > > > > > > b/config/portredir/portredir-backup > > > > > > > new file mode 100644 > > > > > > > index 000000000..bd2ada742 > > > > > > > --- /dev/null > > > > > > > +++ b/config/portredir/portredir-backup > > > > > > > @@ -0,0 +1 @@ > > > > > > > +/var/ipfire/portredir > > > > > > > diff --git a/config/portredir/portredir.cgi > > > > > > > b/config/portredir/portredir.cgi > > > > > > > new file mode 100644 > > > > > > > index 000000000..4913dda3f > > > > > > > --- /dev/null > > > > > > > +++ b/config/portredir/portredir.cgi > > > > > > > @@ -0,0 +1,525 @@ > > > > > > > +#!/usr/bin/perl > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# IPFire.org - A linux based > > > > > > > firewall=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# Copyright (C) 2021=C2=A0 IPFire Team=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# This program is free software: you can redistribute it > > > > > > > and/or modify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# it under the terms of the GNU General Public License > > > > > > > as > > > > > > > published by=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# the Free Software Foundation, either version 3 of the > > > > > > > License, or=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# (at your option) any later > > > > > > > version.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# This program is distributed in the hope that it will > > > > > > > be > > > > > > > useful,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # > > > > > > > +# but WITHOUT ANY WARRANTY; without even the implied > > > > > > > warranty > > > > > > > of=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # > > > > > > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 > > > > > > > See > > > > > > > the=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# GNU General Public License for more > > > > > > > details.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# You should have received a copy of the GNU General > > > > > > > Public > > > > > > > License=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # > > > > > > > +# along with this program.=C2=A0 If not, see < > > > > > > > http://www.gnu.org/licenses/>.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > + > > > > > > > +use strict; > > > > > > > + > > > > > > > +# enable only the following on debugging purpose > > > > > > > +use warnings; > > > > > > > +use CGI::Carp 'fatalsToBrowser'; > > > > > > > + > > > > > > > +require '/var/ipfire/general-functions.pl'; > > > > > > > +require "${General::swroot}/lang.pl"; > > > > > > > +require "${General::swroot}/header.pl"; > > > > > > > + > > > > > > > +# File declarations > > > > > > > +my $settingsfile =3D > > > > > > > "${General::swroot}/portredir/settings"; > > > > > > > +my $redirectsfile =3D > > > > > > > "${General::swroot}/portredir/redirects"; > > > > > > > + > > > > > > > +# Create empty settingsfiles if they does not exist yet > > > > > > > +unless (-e "$settingsfile") { system ("touch > > > > > > > $settingsfile"); > > > > > > > } > > > > > > > +unless (-e "$redirectsfile") { system ("touch > > > > > > > $redirectsfile"); } > > > > > > > + > > > > > > > +# load ipfire settings > > > > > > > +our %netsettings =3D (); > > > > > > > +our %color =3D (); > > > > > > > +&General::readhash("${General::swroot}/ethernet/settings > > > > > > > ", > > > > > > > \%netsettings); > > > > > > > +&General::readhash("/srv/web/ipfire/html/themes/ipfire/i > > > > > > > nclude > > > > > > > /colors.txt", \%color); > > > > > > > + > > > > > > > +my %settings=3D(); > > > > > > > +my %portredirs=3D(); > > > > > > > +my %checked=3D(); # Checkbox manipulations > > > > > > > +my $errormessage=3D''; > > > > > > > +my %selected=3D(); > > > > > > > +our %redirects=3D(); > > > > > > > + > > > > > > > +$settings{'ACTION'} =3D ''; > > > > > > > +$settings{'REDIR_ENABLE_ADDON'}=3D"off"; > > > > > > > +$settings{'REDIR_CUSTOM_GREEN'}=3D"off"; > > > > > > > +$settings{'REDIR_CUSTOM_BLUE'}=3D"off"; > > > > > > > +$settings{'REDIR_CUSTOM_ORANGE'}=3D"off"; > > > > > > > +$settings{'REDIR_DNS_GREEN'}=3D"off"; > > > > > > > +$settings{'REDIR_NTP_GREEN'}=3D"off"; > > > > > > > +$settings{'REDIR_DNS_BLUE'}=3D"off"; > > > > > > > +$settings{'REDIR_NTP_BLUE'}=3D"off"; > > > > > > > +$settings{'REDIR_DNS_ORANGE'}=3D"off"; > > > > > > > +$settings{'REDIR_NTP_ORANGE'}=3D"off"; > > > > > > > + > > > > > > > +&Header::showhttpheaders(); > > > > > > > + > > > > > > > +# Get GUI values > > > > > > > +&Header::getcgihash(\%settings); > > > > > > > + > > > > > > > +# Save action > > > > > > > +if ($settings{'ACTION'} eq $Lang::tr{'save'}) { > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # If custom rules enabled= , deactivate default > > > > > > > rules on > > > > > > > interface > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($settings{'REDIR_CUST= OM_GREEN'} eq "on" ) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $settings{'REDIR_DNS_GREEN'}=3D"off"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $settings{'REDIR_NTP_GREEN'}=3D"off"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($settings{'REDIR_CUST= OM_BLUE'} eq "on" ) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $settings{'REDIR_DNS_BLUE'}=3D"off"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $settings{'REDIR_NTP_BLUE'}=3D"off"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($settings{'REDIR_CUST= OM_ORANGE'} eq "on" ) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $settings{'REDIR_DNS_ORANGE'}=3D"off"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $settings{'REDIR_NTP_ORANGE'}=3D"off"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &General::writehash($sett= ingsfile, \%settings); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($settings{'REDIR_ENAB= LE_ADDON'} eq "on") { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 system ('/usr/local/bin/portredirctrl > > > > > > > restart > > > > > > > > /dev/null 2>&1'); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 system ('/usr/local/bin/portredirctrl > > > > > > > enable > > > > > > > > /dev/null 2>&1'); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 &General::log('portredir addon: port > > > > > > > redirections enabled'); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($settings{'REDIR_ENAB= LE_ADDON'} eq "off") { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 system ('/usr/local/bin/portredirctrl > > > > > > > disable > > > > > > > > /dev/null 2>&1'); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 system ('/usr/local/bin/portredirctrl > > > > > > > stop > > > > > > > > /dev/null 2>&1'); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 &General::log('portredir addon: port > > > > > > > redirections disabled'); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +# Add/edit an entry to the redirectsfile. > > > > > > > + > > > > > > > +} elsif (($settings{'ACTION'} eq $Lang::tr{'add'}) || > > > > > > > ($settings{'ACTION'} eq $Lang::tr{'update'})) { > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Check if any input has = been performed. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($settings{'REDIR_ENTR= Y_ADDRESS'} ne '') { > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Check if the given input is no valid > > > > > > > IP- > > > > > > > address, display an error message. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if > > > > > > > (!&General::validip($settings{'REDIR_ENTRY_ADDRESS'}))=C2=A0 { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $err= ormessage =3D > > > > > > > "$Lang::tr{'portredir > > > > > > > invalid address'}"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $errormessage =3D "$Lang::tr{'portredir > > > > > > > empty > > > > > > > input'}"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Go further if there was= no error. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($errormessage eq '') { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my %redirects =3D (); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $id; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $status; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Assign hash values. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $new_entry_interface =3D > > > > > > > $settings{'REDIR_ENTRY_INTERFACE'}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $new_entry_protocol =3D > > > > > > > $settings{'REDIR_ENTRY_PROTOCOL'}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $new_entry_port =3D > > > > > > > $settings{'REDIR_ENTRY_PORT'}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $new_entry_address =3D > > > > > > > $settings{'REDIR_ENTRY_ADDRESS'}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $new_entry_remark =3D > > > > > > > $settings{'REDIR_ENTRY_REMARK'}; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Read-in redirectsfile. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 &General::readhasharray($redirectsfile, > > > > > > > \%redirects); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Check if we should edit an existing > > > > > > > entry and > > > > > > > got an ID. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if (($settings{'ACTION'} eq > > > > > > > $Lang::tr{'update'}) && ($settings{'ID'})) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # As= sin the provided id. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $id = =3D $settings{'ID'}; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Un= def the given ID. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unde= f($settings{'ID'}); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Gr= ab the configured status of > > > > > > > the > > > > > > > corresponding entry. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $sta= tus =3D $redirects{$id}[4]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } else { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Ea= ch newly added entry > > > > > > > automatically > > > > > > > should be enabled. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $sta= tus =3D "enabled"; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Ge= nerate the ID for the new > > > > > > > entry. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # So= rt the keys by their ID and > > > > > > > store > > > > > > > them in an array. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my @= keys =3D sort { $a <=3D> $b } > > > > > > > keys > > > > > > > %redirects; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Re= verse the key array. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my @= reversed =3D reverse(@keys); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Ob= tain the last used id. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $= last_id =3D @reversed[0]; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # In= crease the last id by one and > > > > > > > use > > > > > > > it as id for the new entry. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $id = =3D ++$last_id; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Add/Modify the entry to/in the > > > > > > > redirects > > > > > > > hash. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $redirects{$id} =3D > > > > > > > ["$new_entry_interface", > > > > > > > "$new_entry_protocol", "$new_entry_port", > > > > > > > "$new_entry_address","$status", "$new_entry_remark"]; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Write the changed redirects hash to the > > > > > > > redirects file. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 &General::writehasharray($redirectsfile, > > > > > > > \%redirects); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +# Toggle Enabled/Disabled for an existing entry on the > > > > > > > redirects list. > > > > > > > + > > > > > > > +} elsif ($settings{'ACTION'} eq $Lang::tr{'toggle enable > > > > > > > disable'}) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my %redirects =3D (); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Only go further, if an = ID has been passed. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($settings{'ID'}) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Assign the given ID. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $id =3D $settings{'ID'}; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Undef the given ID. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 undef($settings{'ID'}); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Read-in ignoredfile. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 &General::readhasharray($redirectsfile, > > > > > > > \%redirects); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Grab the configured status of the > > > > > > > corresponding entry. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 my $status =3D $redirects{$id}[4]; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Switch the status. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if ($status eq "disabled") { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $sta= tus =3D "enabled"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } else { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $sta= tus =3D "disabled"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Modify the status of the existing > > > > > > > entry. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $redirects{$id} =3D ["$redirects{$id}[0]", > > > > > > > "$redirects{$id}[1]", "$redirects{$id}[2]", > > > > > > > "$redirects{$id}[3]","$status", "$redirects{$id}[5]"]; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Write the changed ignored hash to the > > > > > > > redirects file. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 &General::writehasharray($redirectsfile, > > > > > > > \%redirects); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +# Remove entry from redirects list. > > > > > > > + > > > > > > > +} elsif ($settings{'ACTION'} eq $Lang::tr{'remove'}) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my %redirects =3D (); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Read-in redirectsfile. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &General::readhasharray($= redirectsfile, > > > > > > > \%redirects); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # move data on key up > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 foreach my $key (sort key= s %redirects) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if ($key >=3D $settings{'ID'}) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $= next =3D $key + 1; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (= exists $redirects{$next}) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 foreach my $i (0 .. > > > > > > > $#{$redirects{$next}}) { $redirects{$key}[$i] =3D > > > > > > > $redirects{$next}[$i]; } > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $last_key =3D (sort {$= a <=3D> $b} keys > > > > > > > %redirects)[-1]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 delete $redirects{$last_k= ey}; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Undef the given ID. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 undef($settings{'ID'}); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Write the changed redir= ects hash to file. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &General::writehasharray(= $redirectsfile, > > > > > > > \%redirects); > > > > > > > +} > > > > > > > + > > > > > > > +# Load settings from file > > > > > > > +&General::readhash($settingsfile, \%settings); > > > > > > > +&General::readhasharray($redirectsfile, \%redirects); > > > > > > > + > > > > > > > +# Call functions to generate whole page. > > > > > > > +&Header::openpage($Lang::tr{'portredir port > > > > > > > redirections'}, 1, > > > > > > > ''); > > > > > > > +&Header::openbigbox('100%', 'left', '', $errormessage); > > > > > > > + > > > > > > > +if ($errormessage) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &Header::openbox('1= 00%', 'left', > > > > > > > $Lang::tr{'warning > > > > > > > messages'}); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print " > > > > > > color=3D'red'>$errormessage "; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &Header::closebox(); > > > > > > > +} > > > > > > > + > > > > > > > +$checked{'REDIR_ENABLE_ADDON'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_ENABLE_ADDON'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_ENABLE_ADDON'}{$settings{'REDIR_ENABLE_A > > > > > > > DDON'} > > > > > > > } =3D "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_CUSTOM_GREEN'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_CUSTOM_GREEN'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_CUSTOM_GREEN'}{$settings{'REDIR_CUSTOM_G > > > > > > > REEN'} > > > > > > > } =3D "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_CUSTOM_BLUE'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_CUSTOM_BLUE'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_CUSTOM_BLUE'}{$settings{'REDIR_CUSTOM_BL > > > > > > > UE'}} > > > > > > > =3D "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_CUSTOM_ORANGE'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_CUSTOM_ORANGE'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_CUSTOM_ORANGE'}{$settings{'REDIR_CUSTOM_ > > > > > > > ORANGE > > > > > > > '}} =3D "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_DNS_GREEN'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_DNS_GREEN'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_DNS_GREEN'}{$settings{'REDIR_DNS_GREEN'} > > > > > > > } =3D > > > > > > > "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_NTP_GREEN'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_NTP_GREEN'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_NTP_GREEN'}{$settings{'REDIR_NTP_GREEN'} > > > > > > > } =3D > > > > > > > "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_DNS_BLUE'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_DNS_BLUE'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_DNS_BLUE'}{$settings{'REDIR_DNS_BLUE'}} > > > > > > > =3D > > > > > > > "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_NTP_BLUE'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_NTP_BLUE'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_NTP_BLUE'}{$settings{'REDIR_NTP_BLUE'}} > > > > > > > =3D > > > > > > > "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_DNS_ORANGE'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_DNS_ORANGE'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_DNS_ORANGE'}{$settings{'REDIR_DNS_ORANGE > > > > > > > '}} =3D > > > > > > > "checked=3D'checked'"; > > > > > > > +$checked{'REDIR_NTP_ORANGE'}{'off'} =3D ''; > > > > > > > +$checked{'REDIR_NTP_ORANGE'}{'on'} =3D ''; > > > > > > > +$checked{'REDIR_NTP_ORANGE'}{$settings{'REDIR_NTP_ORANGE > > > > > > > '}} =3D > > > > > > > "checked=3D'checked'"; > > > > > > > + > > > > > > > +$selected{'REDIR_ENTRY_INTERFACE'}{$settings{'REDIR_ENTR > > > > > > > Y_INTE > > > > > > > RFACE'}} =3D 'selected'; > > > > > > > +$selected{'REDIR_ENTRY_PROTOCOL'}{$settings{'REDIR_ENTRY > > > > > > > _PROTO > > > > > > > COL'}} =3D 'selected'; > > > > > > > + > > > > > > > +&showMainBox(); > > > > > > > +&showRedirectsBox(); > > > > > > > + > > > > > > > +&Header::closebigbox(); > > > > > > > +&Header::closepage(); > > > > > > > + > > > > > > > +# Function to show main settings and options. > > > > > > > +sub showMainBox() { > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &Header::openbox('100%', = 'center', > > > > > > > "$Lang::tr{'settings'}"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print "
> > > > > > action=3D'$ENV{'SCRIPT_NAME'}'>"; > > > > > > > + > > > > > > > +print < > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +END > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # create html table with = header line 1 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print "
> > > > > > bgcolor=3D'$color{'color20'}'>$Lang::tr{'portredir > > > > > > > common > > > > > > > settings'}
> > > > > > class=3D'base'>$Lang::tr{'portredir enable addon'}: > > > > > > name=3D'REDIR_ENABLE_ADDON' > > > > > > > $checked{'REDIR_ENABLE_ADDON'}{'on'} > > > > > > > />
&nb= sp;
> > > > > > border=3D'0'>"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print ""; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'GREEN_D= EV'})=C2=A0 {print ""; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } else {=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print ""; } > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'BLUE_DE= V'})=C2=A0=C2=A0 {print ""; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } else {=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print ""; } > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'ORANGE_= DEV'}) {print ""; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 } else {=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print ""; } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # the empty right row > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print ""; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # line 2 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print ""; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'GREEN_D= EV'})=C2=A0 {print "";} else { print > > > > > > > "";} > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'BLUE_DE= V'})=C2=A0=C2=A0 {print "";} > > > > > > > else { print "";} > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'ORANGE_= DEV'}) {print "";} else { print > > > > > > > "";} > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # line 3 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print ""; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'GREEN_D= EV'})=C2=A0 {print "";} else { print > > > > > > > "";} > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'BLUE_DE= V'})=C2=A0=C2=A0 {print "";} > > > > > > > else { print "";} > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'ORANGE_= DEV'}) {print "";} else { print > > > > > > > "";} > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # line 4 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print ""; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'GREEN_D= EV'})=C2=A0 {print "";} else { > > > > > > > print > > > > > > > "";} > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'BLUE_DE= V'})=C2=A0=C2=A0 {print "";} else { print > > > > > > > "";} > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($netsettings{'ORANGE_= DEV'}) {print "";} else { > > > > > > > print > > > > > > > "";} > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print < > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > align=3D'left'>$Lang::tr{'portredir fw for > > > > > > > interface'} > > > > > > class=3D'base' width=3D'10%'> > > > > > > color=3Dgreen>$Lang::tr{'green'} > > > > > > class=3D'base' width=3D'10%'> > > > > > > class=3D'base' width=3D'10%'> > > > > > > color=3Dblue>$Lang::tr{'blue'} > > > > > > class=3D'base' width=3D'10%'> > > > > > > class=3D'base' width=3D'10%'> > > > > > > color=3Dorange>$Lang::tr{'orange'} > > > > > > class=3D'base' width=3D'10%'> > > > > > > width=3D'30%'>
$Lang::tr{= 'portredir force local > > > > > > > dns'} > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_DNS_GREEN' > > > > > > > $checked{'REDIR_DNS_GREEN'}{'on'}> > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_DNS_BLUE' > > > > > > > $checked{'REDIR_DNS_BLUE'}{'on'}> > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_DNS_ORANGE' > > > > > > > $checked{'REDIR_DNS_ORANGE'}{'on'}>
$Lang= ::tr{'portredir force > > > > > > > local > > > > > > > ntp'} > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_NTP_GREEN' > > > > > > > $checked{'REDIR_NTP_GREEN'}{'on'}> > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_NTP_BLUE' > > > > > > > $checked{'REDIR_NTP_BLUE'}{'on'}> > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_NTP_ORANGE' > > > > > > > $checked{'REDIR_NTP_ORANGE'}{'on'}>
$Lang= ::tr{'portredir enable > > > > > > > user > > > > > > > redirections'} > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_CUSTOM_GREEN' > > > > > > > $checked{'REDIR_CUSTOM_GREEN'}{'on'}> > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_CUSTOM_BLUE' > > > > > > > $checked{'REDIR_CUSTOM_BLUE'}{'on'}> > > > > > > class=3D'base' align=3D'center'> > > > > > > name=3D'REDIR_CUSTOM_ORANGE' > > > > > > > $checked{'REDIR_CUSTOM_ORANGE'}{'on'}>
> > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
 
> > > > > > align=3D'left'>$Lang::tr{'portredir > > > > > > > save to activate'} > > > > > > align=3D'center'> > > > > > > type=3D'submit' name=3D'ACTION' value=3D'=C2=A0 $Lang::tr{'save= '}=20 > > > > > > > '>
> > > > > > > +END > > > > > > > + > > > > > > > +&Header::closebox(); > > > > > > > +} > > > > > > > + > > > > > > > +# Function to show elements of the redirects file and > > > > > > > allow to > > > > > > > add or remove single members of it. > > > > > > > +sub showRedirectsBox() { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &Header::openbox('1= 00%', 'center', > > > > > > > "$Lang::tr{'portredir custom redirections'}"); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print < > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > border=3D'0'> > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +=C2=A0=C2=A0=C2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0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > +END > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Ch= eck if some rules have been > > > > > > > added > > > > > > > to be redirects. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (= keys (%redirects)) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $col =3D ""; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # List all entries of the > > > > > > > hash. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 foreach my $key (sort > > > > > > > keys > > > > > > > %redirects){ > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # Assign data > > > > > > > array > > > > > > > positions to some nice variable names. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 my $interface =3D > > > > > > > $redirects{$key}[0]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 my $protocol =3D > > > > > > > $redirects{$key}[1]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 my $port=C2=A0 =3D > > > > > > > $redirects{$key}[2]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 my $address =3D > > > > > > > $redirects{$key}[3]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 my $status=C2=A0 =3D > > > > > > > $redirects{$key}[4]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 my $remark=C2=A0 =3D > > > > > > > $redirects{$key}[5]; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # Check if the > > > > > > > key (id) > > > > > > > number is even or not. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if > > > > > > > ($settings{'ID'} eq > > > > > > > $key) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > $col=3D"bgcolor=3D' > > > > > > > ${Header::colouryellow}'"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 } elsif ($key % > > > > > > > 2) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A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A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # Check if the > > > > > > > status > > > > > > > is enabled and select the correct image and description. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if ($status eq > > > > > > > 'enabled' ) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $gif =3D > > > > > > > 'on.gif'; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $gdesc =3D > > > > > > > $Lang::tr{'click to disable'}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A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C2=A0=C2=A0=C2=A0 > > > > > > > +END > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } el= se { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Print notice that > > > > > > > currently > > > > > > > no ports are redirected. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print "\n"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print "\n"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print "\n"; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 print "
> > > > > > bgcolor=3D'$color{'color20'}' > > > > > > > align=3D'center'>$Lang::tr{'interface'} > > > > > > bgcolor=3D'$color{'color20'}' > > > > > > > align=3D'center'>$Lang::tr{'protocol'} > > > > > > bgcolor=3D'$color{'color20'}' > > > > > > > align=3D'center'>$Lang::tr{'port'} > > > > > > bgcolor=3D'$color{'color20'}' > > > > > > > align=3D'center'>$Lang::tr{'ip > > > > > > > address'} > > > > > > bgcolor=3D'$color{'color20'}' > > > > > > > align=3D'center'>$Lang::tr{'remark'} > > > > > > colspan=3D'3' > > > > > > > bgcolor=3D'$color{'color20'}'>
> > > > > > width=3D'15%' > > > > > > > class=3D'base' align=3D'center' $col> > > > > > > color=3D$interface>$Lang::tr{$interface} > > > > > > width=3D'10%' > > > > > > > class=3D'base' align=3D'center' $col>$protocol > > > > > > width=3D'10%' > > > > > > > class=3D'base' align=3D'center' $col>$port > > > > > > width=3D'15%' > > > > > > > class=3D'base' align=3D'center' $col> $address > > > > > > width=3D'40%' > > > > > > > class=3D'base' align=3D'center' $col> $remark > > > > > > align=3D'center' $col> > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=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0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0 > > > > > > disable'}' > > > > > > > src=3D'/images/$gif' alt=3D'$gdesc' title=3D'$gdesc' /> > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > >
> > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A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edit'}' > > > > > > > /> > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0 > > > > > > src=3D'/images/edit.gif' alt=3D'$Lang::tr{'edit'}' > > > > > > > title=3D'$Lang::tr{'edit'}' /> > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=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2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0 > > > > > > value=3D'$Lang::tr{'remove'}'> > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > >
> > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > colspan=3D'2'>$Lang::tr{'portredir no entries'}
\n"; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Section to add new elem= ents or edit existing > > > > > > > ones. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 print < > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > border=3D'0'> > > > > > > > +END > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Assign correct headline= and button text. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $buttontext; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $entry_interface; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $entry_protocol; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $entry_port; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $entry_address; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 my $entry_remark; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Check if an ID (key) ha= s been given, in this > > > > > > > case an > > > > > > > existing entry should be edited. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ($settings{'ID'} ne ''= ) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $buttontext =3D $Lang::tr{'update'}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 print "\n"; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Grab address and remark for the given > > > > > > > key. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $entry_interface =3D > > > > > > > $redirects{$settings{'ID'}}[0]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $entry_protocol =3D > > > > > > > $redirects{$settings{'ID'}}[1]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $entry_port =3D > > > > > > > $redirects{$settings{'ID'}}[2]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $entry_address =3D > > > > > > > $redirects{$settings{'ID'}}[3]; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $entry_remark =3D > > > > > > > $redirects{$settings{'ID'}}[5]; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 $buttontext =3D $Lang::tr{'add'}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 print "\n"; > > > > > > > +=C2=A0=C2=A0=C2=A0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> > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > colspan=3D'6'>$Lang::tr{'update'}
> > > > > > colspan=3D'11'>$Lang::tr{'dnsforward add a new > > > > > > > entry'}
 
> > > > > > width=3D'1%'=20 > > > > > > > bgcolor=3D'$color{'color22'}'> > > > > > > width=3D'15%' > > > > > > > bgcolor=3D'$color{'color22'}' > > > > > > > align=3D'left'>$Lang::tr{'interface'} > > > > > > width=3D'10%' > > > > > > > bgcolor=3D'$color{'color22'}' > > > > > > > align=3D'left'>$Lang::tr{'protocol'} > > > > > > width=3D'10%' > > > > > > > bgcolor=3D'$color{'color22'}' > > > > > > > align=3D'left'> $Lang::tr{'port'} > > > > > > width=3D'13%' > > > > > > > bgcolor=3D'$color{'color22'}' > > > > > > > align=3D'left'> $Lang::tr{'ip > > > > > > > address'} > > > > > > width=3D'30%' > > > > > > > bgcolor=3D'$color{'color22'}' > > > > > > > align=3D'left'> $Lang::tr{'remark'} > > > > > > width=3D'15%' > > > > > > > bgcolor=3D'$color{'color22'}'> > > > > > > width=3D'1%'=20 > > > > > > > bgcolor=3D'$color{'color22'}'>
> > > > > > name=3D'REDIR_ENTRY_PORT'=C2=A0=C2=A0=C2=A0 value=3D'$entry_por= t'=C2=A0=C2=A0=20 > > > > > > > size=3D'4'> > > > > > > name=3D'REDIR_ENTRY_ADDRESS' value=3D'$entry_address' > > > > > > > size=3D'14'> > > > > > > name=3D'REDIR_ENTRY_REMARK'=C2=A0 value=3D'$entry_remark'=20 > > > > > > > size=3D'35'> > > > > > > align=3D'center'> > > > > > > $buttontext=C2=A0 '>
> > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > > +END > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &Header::closebox(); > > > > > > > +} > > > > > > > diff --git a/config/rootfiles/common/misc-progs > > > > > > > b/config/rootfiles/common/misc-progs > > > > > > > index d6594b3f8..fbad2af8b 100644 > > > > > > > --- a/config/rootfiles/common/misc-progs > > > > > > > +++ b/config/rootfiles/common/misc-progs > > > > > > > @@ -17,6 +17,7 @@ usr/local/bin/logwatch > > > > > > > #usr/local/bin/mpfirectrl > > > > > > > usr/local/bin/openvpnctrl > > > > > > > usr/local/bin/pakfire > > > > > > > +#usr/local/bin/portredirctrl > > > > > > > usr/local/bin/qosctrl > > > > > > > usr/local/bin/rebuildhosts > > > > > > > usr/local/bin/rebuildroutes > > > > > > > diff --git a/config/rootfiles/packages/portredir > > > > > > > b/config/rootfiles/packages/portredir > > > > > > > new file mode 100644 > > > > > > > index 000000000..4b4ba8366 > > > > > > > --- /dev/null > > > > > > > +++ b/config/rootfiles/packages/portredir > > > > > > > @@ -0,0 +1,11 @@ > > > > > > > +etc/rc.d/init.d/portredir > > > > > > > +etc/rc.d/rc0.d/K77portredir > > > > > > > +etc/rc.d/rc3.d/S23portredir > > > > > > > +etc/rc.d/rc6.d/K77portredir > > > > > > > +srv/web/ipfire/cgi-bin/portredir.cgi > > > > > > > +usr/local/bin/portredirctrl > > > > > > > +var/ipfire/addon-lang/portredir.de.pl > > > > > > > +var/ipfire/addon-lang/portredir.en.pl > > > > > > > +var/ipfire/backup/addons/includes/portredir > > > > > > > +var/ipfire/menu.d/EX-portredir.menu > > > > > > > +var/ipfire/portredir > > > > > > > diff --git a/lfs/portredir b/lfs/portredir > > > > > > > new file mode 100644 > > > > > > > index 000000000..a4911f71f > > > > > > > --- /dev/null > > > > > > > +++ b/lfs/portredir > > > > > > > @@ -0,0 +1,85 @@ > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# IPFire.org - A linux based > > > > > > > firewall=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# Copyright (C) 2007-2021=C2=A0 IPFire Team=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# This program is free software: you can redistribute it > > > > > > > and/or modify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# it under the terms of the GNU General Public License > > > > > > > as > > > > > > > published by=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# the Free Software Foundation, either version 3 of the > > > > > > > License, or=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# (at your option) any later > > > > > > > version.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# This program is distributed in the hope that it will > > > > > > > be > > > > > > > useful,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # > > > > > > > +# but WITHOUT ANY WARRANTY; without even the implied > > > > > > > warranty > > > > > > > of=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # > > > > > > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 > > > > > > > See > > > > > > > the=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# GNU General Public License for more > > > > > > > details.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# You should have received a copy of the GNU General > > > > > > > Public > > > > > > > License=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # > > > > > > > +# along with this program.=C2=A0 If not, see < > > > > > > > http://www.gnu.org/licenses/>.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > + > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > +# Definitions > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > + > > > > > > > +include Config > > > > > > > + > > > > > > > +VER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1.0 > > > > > > > + > > > > > > > +THISAPP=C2=A0=C2=A0=C2=A0 =3D portredir-$(VER) > > > > > > > +DIR_APP=C2=A0=C2=A0=C2=A0 =3D $(DIR_SRC)/$(THISAPP) > > > > > > > +TARGET=C2=A0=C2=A0=C2=A0=C2=A0 =3D $(DIR_INFO)/$(THISAPP) > > > > > > > +PROG=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D portredir > > > > > > > +PAK_VER=C2=A0=C2=A0=C2=A0 =3D 1 > > > > > > > + > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > +# Top-level Rules > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > + > > > > > > > +install : $(TARGET) > > > > > > > + > > > > > > > +check : > > > > > > > + > > > > > > > +download : > > > > > > > + > > > > > > > +md5 : > > > > > > > + > > > > > > > +dist:=20 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 @$(PAK) > > > > > > > + > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > +# Installation Details > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ################# > > > > > > > + > > > > > > > +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 @$(PREBUILD) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 @rm -rf $(DIR_APP) && cd = $(DIR_SRC) > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #install cgi=20 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 install -v -m 755 > > > > > > > $(DIR_CONF)/portredir/portredir.cgi > > > > > > > /srv/web/ipfire/cgi-bin/ > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #create configuration dir= =20 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -mkdir -pv /var/ipfire/po= rtredir/ > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chown -R nobody:nobody /v= ar/ipfire/portredir/ > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Install include file fo= r backup > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 install -v -m 644 > > > > > > > $(DIR_CONF)/portredir/portredir- > > > > > > > backup /var/ipfire/backup/addons/includes/portredir > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Install menu file > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 install -v -m 644 $(DIR_C= ONF)/portredir/EX- > > > > > > > portredir.menu /var/ipfire/menu.d/ > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chown nobody:nobody /var/= ipfire/menu.d/EX- > > > > > > > portredir.menu > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Install addon-specific = language-files > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 install -v -m 644 > > > > > > > $(DIR_CONF)/portredir/lang/portredir.*.pl > > > > > > > /var/ipfire/addon- > > > > > > > lang/ > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #install initscripts > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(call INSTALL_INITSCRIPT= ,portredir) > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Create symlinks for run= level interaction. > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ln -svf /etc/rc.d/init.d/= portredir > > > > > > > /etc/rc.d/rc3.d/S23portredir > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ln -svf /etc/rc.d/init.d/= portredir > > > > > > > /etc/rc.d/rc0.d/K77portredir > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ln -svf /etc/rc.d/init.d/= portredir > > > > > > > /etc/rc.d/rc6.d/K77portredir > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 @rm -rf $(DIR_APP) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 @$(POSTBUILD) > > > > > > > + > > > > > > > diff --git a/make.sh b/make.sh > > > > > > > index fc03ebcd5..ab9fe881a 100755 > > > > > > > --- a/make.sh > > > > > > > +++ b/make.sh > > > > > > > @@ -1623,6 +1623,7 @@ buildipfire() { > > > > > > > =C2=A0lfsmake2 socat > > > > > > > =C2=A0lfsmake2 libcdada > > > > > > > =C2=A0lfsmake2 pmacct > > > > > > > +=C2=A0 lfsmake2 portredir > > > > > > > } > > > > > > >=20 > > > > > > > buildinstaller() { > > > > > > > diff --git a/src/initscripts/packages/portredir > > > > > > > b/src/initscripts/packages/portredir > > > > > > > new file mode 100644 > > > > > > > index 000000000..cc57fb9cc > > > > > > > --- /dev/null > > > > > > > +++ b/src/initscripts/packages/portredir > > > > > > > @@ -0,0 +1,191 @@ > > > > > > > +#!/bin/sh > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ########## > > > > > > > +# Begin $rc_base/init.d/portredir > > > > > > > +# > > > > > > > +# Description : portredir init script for DNS/NTP and > > > > > > > custom=20 > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 port redirection rules > > > > > > > +# > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ########## > > > > > > > + > > > > > > > +. /etc/sysconfig/rc > > > > > > > +. ${rc_functions} > > > > > > > + > > > > > > > +IPT=3D"/sbin/iptables"; > > > > > > > +parent_chain=3D"PREROUTING"; > > > > > > > +chain=3D"PORT_REDIRECT"; > > > > > > > + > > > > > > > +confdir=3D"/var/ipfire/portredir"; > > > > > > > +settingsfile=3D"${confdir}/settings"; > > > > > > > +redirectsfile=3D"${confdir}/redirects"; > > > > > > > +SYSLOG=3D"NO"; > > > > > > > +VERBOSE=3D"NO"; > > > > > > > + > > > > > > > +eval $(/usr/local/bin/readhash > > > > > > > /var/ipfire/ethernet/settings); > > > > > > > +eval $(/usr/local/bin/readhash ${settingsfile}); > > > > > > > + > > > > > > > +logtext() { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [ "${SYSLOG}" =3D "YES= " ]; then logger -t > > > > > > > "portredir" > > > > > > > ${1}; fi; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [ "${VERBOSE}" =3D "YE= S" ]; then echo ${1}; fi;} > > > > > > > + > > > > > > > +create_chain() { > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 local line=3D$(${IPT} -t = nat -L ${parent_chain} -- > > > > > > > line- > > > > > > > numbers |grep "SQUID" |awk '{printf($1)}'); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [[ "${REDIR_ENABLE_ADD= ON}" =3D=3D "off" || -z > > > > > > > "${REDIR_ENABLE_ADDON}" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 logtext "addon not enabled in web > > > > > > > interface..."; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 echo "Portredir addon not enabled in web > > > > > > > interface..."; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 exit 0; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [ -z "$(${IPT} -t nat = -L ${parent_chain} |grep > > > > > > > ${chain})" ]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -N ${chain}; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if [ ! -z "${line}" ]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logt= ext "create chain ${chain} > > > > > > > and link > > > > > > > in ${parent_chain} at position ${line}..."; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${IP= T} -t nat -I ${parent_chain} > > > > > > > ${line} -j ${chain}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 else > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logt= ext "create chain ${chain} > > > > > > > and link > > > > > > > in ${parent_chain} at last position..."; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${IP= T} -t nat -A ${parent_chain} > > > > > > > -j > > > > > > > ${chain}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 return 1; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0; > > > > > > > +} > > > > > > > + > > > > > > > +remove_chain() { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [ ! -z "$(${IPT} -t na= t -L ${parent_chain} > > > > > > > |grep > > > > > > > ${chain})" ]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 logtext "remove chain ${chain} and link > > > > > > > in > > > > > > > ${parent_chain} from system..."; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -D "${parent_chain}" -j > > > > > > > ${chain}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -F ${chain}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -X ${chain}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 return 1; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0; > > > > > > > +} > > > > > > > + > > > > > > > +activate_custom_redirections() { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 local array=3D(); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 local redirects=3D(); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 local i; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 index=3D(); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 iface=3D(); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 protocol=3D(); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 port=3D(); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 targetip=3D(); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 enabled=3D(); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 IFS=3D$'\n' read -d '' -r= a redirects < > > > > > > > ${redirectsfile}; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for i in "${!redirects[@]= }" > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 do > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 IFS=3D$',' read -ra array <<< > > > > > > > ${redirects[i]}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 index[i]=3D${array[0]}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 iface[i]=3D${array[1]}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 protocol[i]=3D${array[2]}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 port[i]=3D${array[3]}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 targetip[i]=3D${array[4]}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 enabled[i]=3D${array[5]}; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 done > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for i in "${!index[@]}" > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 do > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if [[ ! -z "${GREEN_DEV}" &&=C2=A0 > > > > > > > "${iface[i]}" =3D > > > > > > > "green" && "${enabled[i]}" =3D "enabled" ]]; then > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logt= ext "add redirect in ${chain} > > > > > > > on > > > > > > > ${GREEN_DEV} ip ${targetip[i]} protocol ${protocol[i]} > > > > > > > port > > > > > > > ${port[i]} "; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${IP= T} -t nat -A ${chain} -i > > > > > > > ${GREEN_DEV} -d ${targetip[i]} -p ${protocol[i]} -m > > > > > > > ${protocol[i]} --dport ${port[i]} -j RETURN; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${IP= T} -t nat -A ${chain} -i > > > > > > > ${GREEN_DEV} -p ${protocol[i]} -m ${protocol[i]} --dport > > > > > > > ${port[i]} -j REDIRECT; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if [[ ! -z "${BLUE_DEV}" &&=C2=A0 > > > > > > > "${iface[i]}" =3D > > > > > > > "blue" && "${enabled[i]}" =3D "enabled" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logt= ext "add redirect in ${chain} > > > > > > > on > > > > > > > ${BLUE_DEV} ip ${targetip[i]} protocol ${protocol[i]} > > > > > > > port > > > > > > > ${port[i]} "; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${IP= T} -t nat -A ${chain} -i > > > > > > > ${BLUE_DEV} -d ${targetip[i]} -p ${protocol[i]} -m > > > > > > > ${protocol[i]} --dport ${port[i]} -j RETURN; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${IP= T} -t nat -A ${chain} -i > > > > > > > ${BLUE_DEV} -p ${protocol[i]} -m ${protocol[i]} --dport > > > > > > > ${port[i]} -j REDIRECT; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if [[ ! -z "${ORANGE_DEV}" &&=C2=A0 > > > > > > > "${iface[i]}" =3D > > > > > > > "orange" && "${enabled[i]}" =3D "enabled" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logt= ext "add redirect in ${chain} > > > > > > > on > > > > > > > ${ORANGE_DEV} ip ${targetip[i]} protocol ${protocol[i]} > > > > > > > port > > > > > > > ${port[i]} "; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${IP= T} -t nat -A ${chain} -i > > > > > > > ${ORANGE_DEV} -d ${targetip[i]} -p ${protocol[i]} -m > > > > > > > ${protocol[i]} --dport ${port[i]} -j RETURN; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${IP= T} -t nat -A ${chain} -i > > > > > > > ${ORANGE_DEV} -p ${protocol[i]} -m ${protocol[i]} --dport > > > > > > > ${port[i]} -j REDIRECT; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 done > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unset array redirects i i= ndex iface protocol port > > > > > > > targetip enabled; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0; > > > > > > > +} > > > > > > > + > > > > > > > +activate_redirections() { > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ! create_chain; then r= eturn 1; fi; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Force DNS REDIRECTs on = GREEN (udp, tcp, 53) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [[ "${REDIR_DNS_GREEN}= " =3D=3D "on" &&=20 > > > > > > > "${REDIR_CUSTOM_GREEN}" =3D "off" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${GREEN_DEV} > > > > > > > -d > > > > > > > ${GREEN_ADDRESS} -p udp -m udp --dport domain -j RETURN; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${GREEN_DEV} > > > > > > > -p > > > > > > > udp -m udp --dport domain -j REDIRECT; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${GREEN_DEV} > > > > > > > -d > > > > > > > ${GREEN_ADDRESS} -p tcp -m tcp --dport domain -j RETURN; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${GREEN_DEV} > > > > > > > -p > > > > > > > tcp -m tcp --dport domain -j REDIRECT; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Force DNS REDIRECTs on = BLUE (udp, tcp, 53) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [[ "${REDIR_DNS_BLUE}"= =3D=3D "on" &&=20 > > > > > > > "${REDIR_CUSTOM_BLUE}" =3D "off" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${BLUE_DEV} > > > > > > > -d > > > > > > > ${BLUE_ADDRESS} -p udp -m udp --dport domain -j RETURN > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${BLUE_DEV} > > > > > > > -p udp > > > > > > > -m udp --dport domain -j REDIRECT > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${BLUE_DEV} > > > > > > > -d > > > > > > > ${BLUE_ADDRESS} -p tcp -m tcp --dport domain -j RETURN > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${BLUE_DEV} > > > > > > > -p tcp > > > > > > > -m tcp --dport domain -j REDIRECT > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Force DNS REDIRECTs on = ORANGE (udp, tcp, 53) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [[ "${REDIR_DNS_ORANGE= }" =3D=3D "on" &&=20 > > > > > > > "${REDIR_CUSTOM_ORANGE}" =3D "off" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i > > > > > > > ${ORANGE_DEV} -d > > > > > > > ${ORANGE_ADDRESS} -p udp -m udp --dport domain -j RETURN > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i > > > > > > > ${ORANGE_DEV} -p > > > > > > > udp -m udp --dport domain -j REDIRECT > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i > > > > > > > ${ORANGE_DEV} -d > > > > > > > ${ORANGE_ADDRESS} -p tcp -m tcp --dport domain -j RETURN > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i > > > > > > > ${ORANGE_DEV} -p > > > > > > > tcp -m tcp --dport domain -j REDIRECT > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Force NTP REDIRECTs on = GREEN (udp, 123) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [[ "${REDIR_NTP_GREEN}= " =3D=3D "on" &&=20 > > > > > > > "${REDIR_CUSTOM_GREEN}" =3D "off" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${GREEN_DEV} > > > > > > > -d > > > > > > > ${GREEN_ADDRESS} -p udp -m udp --dport ntp -j RETURN > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${GREEN_DEV} > > > > > > > -p > > > > > > > udp -m udp --dport ntp -j REDIRECT > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Force NTP REDIRECTs on = BLUE (udp, 123) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [[ "${REDIR_NTP_BLUE}"= =3D=3D "on" &&=20 > > > > > > > "${REDIR_CUSTOM_BLUE}" =3D "off" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${BLUE_DEV} > > > > > > > -d > > > > > > > ${BLUE_ADDRESS} -p udp -m udp --dport ntp -j RETURN > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i ${BLUE_DEV} > > > > > > > -p udp > > > > > > > -m udp --dport ntp -j REDIRECT > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Force NTP REDIRECTs on = ORANGE (udp, 123) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if [[ "${REDIR_NTP_ORANGE= }" =3D=3D "on" &&=20 > > > > > > > "${REDIR_CUSTOM_ORANGE}" =3D "off" ]]; then > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i > > > > > > > ${ORANGE_DEV} -d > > > > > > > ${ORANGE_ADDRESS} -p udp -m udp --dport ntp -j RETURN > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${IPT} -t nat -A ${chain} -i > > > > > > > ${ORANGE_DEV} -p > > > > > > > udp -m udp --dport ntp -j REDIRECT > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if ! activate_custom_redi= rections; then return 1; > > > > > > > fi; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0; > > > > > > > +} > > > > > > > + > > > > > > > +case "${1}" in > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 start) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 boot_mesg "Loading port redirections..." > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 activate_redirections; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 evaluate_retval; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ;; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 stop)=C2=A0=C2=A0=20 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 boot_mesg "Removing port redirections..." > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 remove_chain; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 evaluate_retval; > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ;; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 restart) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${0} stop > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ${0} start > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ;; > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 echo "Usage: ${0} {start|stop|restart}" > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 exit 1 > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ;; > > > > > > > +esac > > > > > > > + > > > > > > > +# End $rc_base/init.d/portredir > > > > > > > diff --git a/src/misc-progs/Makefile b/src/misc- > > > > > > > progs/Makefile > > > > > > > index 7c3ef7529..850f8fdcc 100644 > > > > > > > --- a/src/misc-progs/Makefile > > > > > > > +++ b/src/misc-progs/Makefile > > > > > > > @@ -30,7 +30,7 @@ SUID_PROGS =3D squidctrl sshctrl > > > > > > > ipfirereboot \ > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 wirelessctrl getipst= at qosctrl \ > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 redctrl syslogdctrl = extrahdctrl sambactrl \ > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 smartctrl clamavctrl= addonctrl pakfire mpfirectrl > > > > > > > wlanapctrl \ > > > > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 setaliases urlfilterctrl = updxlratorctrl > > > > > > > fireinfoctrl > > > > > > > rebuildroutes \ > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 setaliases urlfilterctrl = updxlratorctrl > > > > > > > fireinfoctrl > > > > > > > rebuildroutes portredirctrl \ > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 getconntracktable wi= relessclient torctrl ddnsctrl > > > > > > > unboundctrl \ > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 captivectrl > > > > > > >=20 > > > > > > > diff --git a/src/misc-progs/portredirctrl.c b/src/misc- > > > > > > > progs/portredirctrl.c > > > > > > > new file mode 100644 > > > > > > > index 000000000..7897d711c > > > > > > > --- /dev/null > > > > > > > +++ b/src/misc-progs/portredirctrl.c > > > > > > > @@ -0,0 +1,47 @@ > > > > > > > +/* This file is part of the IPFire Firewall. > > > > > > > + * > > > > > > > + * This program is distributed under the terms of the > > > > > > > GNU > > > > > > > General Public > > > > > > > + * Licence.=C2=A0 See the file COPYING for details. > > > > > > > + * > > > > > > > + */ > > > > > > > + > > > > > > > +#include > > > > > > > +#include > > > > > > > +#include > > > > > > > +#include > > > > > > > +#include > > > > > > > +#include > > > > > > > +#include "setuid.h" > > > > > > > + > > > > > > > +int main(int argc, char *argv[]) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!(initsetuid())) > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 exit(1); > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // Check what command is = asked > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (argc < 2) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fprintf(stderr, "\nNo argument > > > > > > > given.\n\nportredirctrl > > > > > > > (start|stop|restart|enable|disable)\n\n"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit(1); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (strcmp(argv[1],= "start") =3D=3D 0) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 safe_system("/etc/rc.d/init.d/portredir > > > > > > > start"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else if (strcmp(a= rgv[1], "stop") =3D=3D 0) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 safe_system("/etc/rc.d/init.d/portredir > > > > > > > stop"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else if (strcmp(a= rgv[1], "restart") =3D=3D 0) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 safe_system("/etc/rc.d/init.d/portredir > > > > > > > restart"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else if (strcmp(argv[1]= , "enable") =3D=3D 0) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 safe_system("touch > > > > > > > /var/ipfire/portredir/enable"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 safe_system("ln -snf > > > > > > > /etc/rc.d/init.d/portredir > > > > > > > /etc/rc.d/rc3.d/S23portredir >/dev/null 2>&1"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 safe_system("ln -snf > > > > > > > /etc/rc.d/init.d/portredir > > > > > > > /etc/rc.d/rc0.d/K77portredir >/dev/null 2>&1"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 safe_system("ln -snf > > > > > > > /etc/rc.d/init.d/portredir > > > > > > > /etc/rc.d/rc6.d/K77portredir >/dev/null 2>&1"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else if (strcmp(argv[1]= , "disable") =3D=3D 0) { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 safe_system("/etc/rc.d/init.d/portredir > > > > > > > stop"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 safe_system("unlink > > > > > > > /var/ipfire/portredir/enable"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 safe_system("rm -rf > > > > > > > /etc/rc.d/rc*.d/*portredir > > > > > > > > /dev/null 2>&1"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else { > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fprintf(stderr, "\nBad argument > > > > > > > given.\n\nportredirctrl > > > > > > > (start|stop|restart|enable|disable)\n\n"); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit(1); > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > > + > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0; > > > > > > > +} > > > > > > > diff --git a/src/paks/portredir/install.sh > > > > > > > b/src/paks/portredir/install.sh > > > > > > > new file mode 100644 > > > > > > > index 000000000..9f69aeae2 > > > > > > > --- /dev/null > > > > > > > +++ b/src/paks/portredir/install.sh > > > > > > > @@ -0,0 +1,32 @@ > > > > > > > +#!/bin/bash > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ############## > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# This file is part of the IPFire > > > > > > > Firewall.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# IPFire is free software; you can redistribute it > > > > > > > and/or > > > > > > > modify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 # > > > > > > > +# it under the terms of the GNU General Public License > > > > > > > as > > > > > > > published by=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# the Free Software Foundation; either version 2 of the > > > > > > > License, or=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# (at your option) any later > > > > > > > version.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# IPFire is distributed in the hope that it will be > > > > > > > useful,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# but WITHOUT ANY WARRANTY; without even the implied > > > > > > > warranty > > > > > > > of=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 > > > > > > > See > > > > > > > the=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # > > > > > > > +# GNU General Public License for more > > > > > > > details.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# You should have received a copy of the GNU General > > > > > > > Public > > > > > > > License=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# along with IPFire; if not, write to the Free > > > > > > > Software=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, > > > > > > > MA=20 > > > > > > > 02111-1307 USA # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# Copyright (C) 2021 IPFire-Team > > > > > > > .=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ############## > > > > > > > +# > > > > > > > +. /opt/pakfire/lib/functions.sh > > > > > > > +extract_files > > > > > > > +restore_backup ${NAME} > > > > > > > + > > > > > > > +/usr/local/bin/update-lang-cache > > > > > > > + > > > > > > > +chown root:nobody /usr/local/bin/portredirctrl > > > > > > > +chmod 4750 /usr/local/bin/portredirctrl > > > > > > > +chmod u+s /usr/local/bin/portredirctrl > > > > > > > diff --git a/src/paks/portredir/uninstall.sh > > > > > > > b/src/paks/portredir/uninstall.sh > > > > > > > new file mode 100644 > > > > > > > index 000000000..df9270125 > > > > > > > --- /dev/null > > > > > > > +++ b/src/paks/portredir/uninstall.sh > > > > > > > @@ -0,0 +1,28 @@ > > > > > > > +#!/bin/bash > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ############## > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# This file is part of the IPFire > > > > > > > Firewall.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# IPFire is free software; you can redistribute it > > > > > > > and/or > > > > > > > modify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 # > > > > > > > +# it under the terms of the GNU General Public License > > > > > > > as > > > > > > > published by=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# the Free Software Foundation; either version 2 of the > > > > > > > License, or=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# (at your option) any later > > > > > > > version.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# IPFire is distributed in the hope that it will be > > > > > > > useful,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# but WITHOUT ANY WARRANTY; without even the implied > > > > > > > warranty > > > > > > > of=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 > > > > > > > See > > > > > > > the=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # > > > > > > > +# GNU General Public License for more > > > > > > > details.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# You should have received a copy of the GNU General > > > > > > > Public > > > > > > > License=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# along with IPFire; if not, write to the Free > > > > > > > Software=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, > > > > > > > MA=20 > >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=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ############## > > > > > > > +# > > > > > > > +. /opt/pakfire/lib/functions.sh > > > > > > > +make_backup ${NAME} > > > > > > > +remove_files > > > > > > > + > > > > > > > +/usr/local/bin/update-lang-cache > > > > > > > diff --git a/src/paks/portredir/update.sh > > > > > > > b/src/paks/portredir/update.sh > > > > > > > new file mode 100644 > > > > > > > index 000000000..89c40d0d7 > > > > > > > --- /dev/null > > > > > > > +++ b/src/paks/portredir/update.sh > > > > > > > @@ -0,0 +1,26 @@ > > > > > > > +#!/bin/bash > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ############## > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# This file is part of the IPFire > > > > > > > Firewall.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# IPFire is free software; you can redistribute it > > > > > > > and/or > > > > > > > modify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 # > > > > > > > +# it under the terms of the GNU General Public License > > > > > > > as > > > > > > > published by=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# the Free Software Foundation; either version 2 of the > > > > > > > License, or=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# (at your option) any later > > > > > > > version.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# IPFire is distributed in the hope that it will be > > > > > > > useful,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# but WITHOUT ANY WARRANTY; without even the implied > > > > > > > warranty > > > > > > > of=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 > > > > > > > See > > > > > > > the=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # > > > > > > > +# GNU General Public License for more > > > > > > > details.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# You should have received a copy of the GNU General > > > > > > > Public > > > > > > > License=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# along with IPFire; if not, write to the Free > > > > > > > Software=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, > > > > > > > MA=20 > > > > > > > 02111-1307 USA # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +# Copyright (C) 2007 IPFire-Team > > > > > > > .=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 # > > > > > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # > > > > > > > +######################################################## > > > > > > > ###### > > > > > > > ############## > > > > > > > +# > > > > > > > +. /opt/pakfire/lib/functions.sh > > > > > > > +./uninstall.sh > > > > > > > +./install.sh > > > > > > > --=20 > > > > > > > 2.18.0 > > > > > > >=20 > > > > > >=20 > > > > >=20 > > > >=20 > > >=20 > >=20 >=20 --===============3184939463331168533==--