Commit Graph

3033 Commits

Author SHA1 Message Date
Vincent Li
a06eab4ae1 keepalived vs/rs UI: add virtual/real server UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-05 21:46:07 +00:00
Vincent Li
fae6f15fbe LoxiLB UI: remove @nosaved items
remove @nosaved from /var/ipfire/loxilb/settings
as it could interfere with running state of
loxilb

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-01 04:14:51 +00:00
Vincent Li
ebdd4d59b4 keepalived UI: remove @nosaved item
remove @nosaved item from form submission
before writehash to each setting file because
it could interfere with each other.

for example, when change keepalived configuration
for green or red interface from the UI,
without removing @nosaved which has 'ENABLE_HA'
before writehash, 'ENABLE_HA=off' would be saved
in '/var/ipfire/keepalived/settings', this would
trigger the UI to show keepalived being "STOPPED"
or it could actually stopoped keepalived.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-01 00:16:30 +00:00
Vincent Li
4363971e05 dhcp: allow user to specify router IP
In BPFire HA deployment, a floating/shared router IP
is required for backend/endpoint server. by default
BPFire uses the primary IP on green0 when running
setup script. Now the floating/shared router IP can
be added to green0 interface as secondary IP through
loxilb UI, keepalived UI can configure the secondary
IP as virtual ipaddress, when HA failover happens,
keepalived will move the virtual ipaddress to new active
BPFire.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 20:57:01 +00:00
Vincent Li
ed89f965bf keepalived UI: add keepalived UI
BPFire red0 does not support multicast, need to
have unicast peer configured, then the virtual
ipaddress can be added to red0 interface.

the UI requires /var/ipfire/keepalived/runsettings
/var/ipfire/keepalived/settings to be created, so
add them lfs/configroot

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 20:55:28 +00:00
Vincent Li
07750a74ba LoxiLB UI: add required field mark
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 19:14:30 +00:00
Vincent Li
61d054216d LoxiLB UI: select virtual ip from red0 interface
since we added loxilb ip management to add ip on
red0 interface, we can select the virtual ip from
red0 interface.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-20 02:49:02 +00:00
Vincent Li
780f556e9c LoxiLB UI: add loxilb ip management
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-20 02:48:55 +00:00
Vincent Li
8f4062f4da LoxiLB UI: show loxilb server running status
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-15 20:52:48 +00:00
Vincent Li
56461e0173 errormessage: use red color for errormessage
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-15 02:14:22 +00:00
Vincent Li
4bbf33e119 LoxiLB: lb config requires lb name
since now we delete lb by name, so lb name
is required field.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-15 00:46:30 +00:00
Vincent Li
e928445c91 LoxiLB: delete lb by name
since loxilb is upgraded to 0.9.4 which allows
loxicmd delete lb by name.

fix: https://github.com/vincentmli/BPFire/issues/26

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-14 22:14:16 +00:00
Vincent Li
94f9604493 LoxiLB: remove workaround in loxilbconfig.cgi
now loxilb is upgraded to 0.9.4, it fixes:
https://github.com/vincentmli/BPFire/issues/25

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-14 22:06:19 +00:00
Vincent Li
0003dd9c8c Loxilb UI: add loxilb firewall UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-13 04:22:02 +00:00
Vincent Li
63c3e67c07 loxilb UI: fix updating existing LB mode/sel
fix: https://github.com/vincentmli/BPFire/issues/24

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-02 01:54:02 +00:00
Vincent Li
6df412401c loxilb UI: add backend monitor option
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-01 21:09:54 +00:00
Vincent Li
284b13c137 loxilb UI: use select drop down option
learned from ChatGPT to print dynamic options.
add semi column ';' right after heredoc like:

print <<END;
...
...
END

following result in error

print <<END
...
...
END; #<<<< ERROR

following is correct

print <<END
...
...
END
;

so better use the first format

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-01 20:42:16 +00:00
Vincent Li
6994edf40b Add loxilb lb config UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-01 14:15:41 +00:00
Vincent Li
9c58dcd145 Add WebUI loxilb.cgi for ebpf load balancer
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-27 18:23:17 +00:00
Vincent Li
a9c944483b Add loxilb load balancer menu
run command below when update language menu
perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-27 18:23:17 +00:00
Vincent Li
ad771dfe3b ddos.cgi add ratelimit UI 2024-04-24 00:48:04 +00:00
Vincent Li
00cd284e54 Revert "ddos.cgi remove duplicate code"
This reverts commit 8ca6049b32.
2024-04-24 00:48:04 +00:00
Vincent Li
a925c32ecb Revert "ddos.cgi add ratelimit UI"
This reverts commit e3ea91ca5898f0d32cd2733efcd3297d30ffa80e.
2024-04-24 00:48:04 +00:00
Vincent Li
6accd9056f ddos.cgi add ratelimit UI
add ratelimit UI for xdp dns and udp program

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-24 00:48:04 +00:00
Vincent Li
8ca6049b32 ddos.cgi remove duplicate code
improve ddos.cgi by making a few sub routines
to remove duplicate code

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-19 17:00:18 +00:00
Vincent Li
fcdc42ea40 ddos.cgi add DNS DDoS UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-18 02:29:27 +00:00
Vincent Li
56c5212374 firewall.cgi XDP SYNPROXY UI option
only show XDP SYNPROXY option when protocol
TCP is selected.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 16:09:54 +00:00
Vincent Li
13bb8928c9 Change header from IPFire_ to BPFire_
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 01:26:16 +00:00
Vincent Li
9a53289a23 ddos.cgi add UDP DDoS WebUI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 00:17:41 +00:00
Vincent Li
6e71870648 ddos.cgi clean up and fix
write to /var/ipfire/ddos/settings file before
enable ddos to allow /etc/rc.d/init.d/ddos script
start up ddos according to the setting from
/var/ipfire/ddos/settings

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-14 03:16:53 +00:00
Vincent Li
addfe66863 Change ddos.cgi to call ddosctrl
call ddosctrl with safety from ddos.cgi

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:31 +00:00
Vincent Li
8e4e24a9b9 Add XDP DDoS ddos.cgi
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:07 +00:00
Vincent Li
dbb9b7014f fix remote.cgi code style
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-16 03:26:26 +00:00
Vincent Li
968fd0ca40 make sub routine for various rule check
with routine, we could reuse the code if possible.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-14 23:49:14 +00:00
Vincent Li
852567122e Add XDP SYNPROXY iptables rule UI option
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-12 02:41:43 +00:00
Michael Tremer
9f01011570 vpnmain.cgi: Add option to regenerate the host certificate
This is necessary since we now have a much shorter lifetime for the host
certificate. However, it is complicated to do this is which is why we
are copying the previous certificate and generate a new CSR. This is
then signed.

A caveat of this patch is that we do not rollover the key.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:08:51 +00:00
Michael Tremer
aa07e1bb3e vpnmain.cgi: Return the entire error message if OpenSSL fails
The function did not evaluate the return code which is why it used a
hack to figure out if some output is an error or not.

This is being fixed in this commit and the entire output is being
returned if the return code is non-zero.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:07:53 +00:00
Michael Tremer
182743310c vpnmain.cgi: Do not use a bad source for randomness
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:07:53 +00:00
Adolf Belka
b4f6962c4d optionsfw.cgi: Move Firewall Options Drop commands to before the logging section
- Moved the Firewall Options Drop commands to before the logging section, as discussed
   at January 2024 Video Call.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:02:18 +00:00
Adolf Belka
89645d1bbf optionsfw.cgi: Fix bug12981 - Add option to log or not log dropped hostile traffic
- This v3 version has split the logging choice for drop hostile to separate the logging of
   incoming drop hostile and outgoing drop hostile.
- The bug originator had no port forwards so all hostile would be dropped normally anyway.
   However the logs were being swamped by the logging of drop hostile making analysis
   difficult. So incoming drop hostile was desired to not be logged. However logging of
   outgoing drop hostile was desired to identify if clients on the internal lan were
   infected with malware trying to reach home.
- Added option with drop hostile section to decide if the dropped traffic should be
   logged or not.

Fixes: bug12981
Tested-by: Adolf Belka <adolf.belka@ipfire.org
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:02:17 +00:00
Michael Tremer
fc4b02df53 vpnmain.cgi: Fix parsing CN from certificates generated by OpenSSL 3.2
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-30 17:42:37 +00:00
Michael Tremer
b4880b752e web-user-interface: Force browsers to reload the changed CSS
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-25 10:22:18 +00:00
Michael Tremer
9d30f138f9 index.cgi: Remove some custom CSS styling that broke the design
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-10 12:25:33 +00:00
Michael Tremer
0e415928b7 web-user-interface: Replace the old tux logo with out new word mark
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-10 12:23:15 +00:00
Michael Tremer
dbf1d1634b web-user-interface: Update interface design
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-10 12:13:04 +00:00
Michael Tremer
a1bb2fb585 Revert "proxy.cgi: Fix for Bug #12826 'squid >=5 crashes on literal IPv6 addresses'"
This reverts commit e0be9eab47.

This change is now producing problems on IPv6-enabled systems as it will
deny access to any website that is IPv6-enabled as well, even if the
client connected using IPv4.

I have tested if squid is now running on fine on systems where IPv6 is
disabled and can confirm that its running just fine.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2024-01-08 18:34:58 +00:00
Adolf Belka
f16eeae078 dhcp.cgi: Adjust legend entries to make clear they are legends and not messages
- A new IPFire user on the forum saw the orange and red coloured blocks in the legend
   section and believed that they were messages about problems that had been created with
   the fixed leases.
- This change puts a small block with seperate explanatory text for both the orange and
   red coloured blocks.
- This change will also be applied to the wiki in a much clearer way

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2024-01-03 21:02:19 +00:00
Adolf Belka
dcb878d6a1 dhcp.cgi: Adjust spacing between an icon and explanatory text
- When dealing with a problem on the forum I noticed that in the Fixed Leases table
   Legend section there was a very large space between the empty checkbox icon and the
   explanatory text. It looks like the &nbsp that I have removed worked on the text
   section 'click to enable' as that was moved but not on the off.gif icon as that stayed
   in its original place leaving a very large space between the icon and the explanatory
   text. Removing the two &nbsp; commands fixes that.
- Reading up about &nbsp the problem might be related to these tags no longer being
   recommended to use with the newer HTML versions and that indenting or spacing should be
   done via CSS code. Will have a look in future on how to accomplish this via CSS.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2024-01-03 21:02:19 +00:00
Peter Müller
ac225ec698 firewalllog.dat: Update copyright header
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-12-30 07:05:49 +00:00
Adolf Belka
f02adfbc74 firewalllog.dat: Fix for bug#13492 - include chain in the exported output
- The regex code does not extract out the chain and so it is missed off from the log output
   when it is exported.
- Changed code tested out on my vm testbed and confirmed to work and include the chain in
   the output.

Fixes: Bug13492
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfre.org>
2023-12-30 07:04:02 +00:00