Commit Graph

3041 Commits

Author SHA1 Message Date
Vincent Li
3e3b5c0e89 UI: adjust credits for BPFire/IPFire support
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-10 03:03:22 +00:00
Vincent Li
6047d1079b fireinfo: remove fireinfo profile collection
should not send bpfire user profile to ipfire
to confuse ipfire community, bpfire could setup
such profile collection in the future.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 04:29:19 +00:00
Vincent Li
c834aa67d4 WebUI: change donation link to bpfire maintainer
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 04:29:12 +00:00
Vincent Li
24d3822f82 WebUI: remove ipfire release update info
User should not update ipfire because that
would remove all BPFire eBPF applications

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 00:32:30 +00:00
Vincent Li
5f9125b044 loxilb UI: save loxilb configuration
save IP/LB/FW configuration from loxilb UI so
when loxilb restart or bpfire reboot, the configuration
can be restored.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-25 16:41:31 +00:00
Vincent Li
6d3717d9c7 keepalived UI: add dummy ip for HA state tracking
add dummy ip 192.0.2.1 in virutal_ipaddress from (TEST-NET-1)
according to https://www.rfc-editor.org/rfc/rfc5737#section-3
for keepalived HA state tracking, the Master will always
have the dummy ip assigned to green0.

add refresh button for HA state refresh

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-13 02:14:41 +00:00
Vincent Li
dcb6b5e117 LoxiLB UI: get VIP from ipconfigfile
in HA scenario, the shared/floating VIP
is not configured on the red0 interface

when setup LoxiLB lb from the UI in standby
BPFire, some VIPs are missing since these
VIPs are only configured in the active BPFire.

get VIPs from /var/ipfire/loxilb/ipconfigfile

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:46 +00:00
Vincent Li
067bbaf136 LoxiLB: rename UI ipconfig to ipconfigfile
when run loxicmd save -a -c /var/ipfire/loxilb/
ipconfig directory will be created, which conflicts
with loxilb UI that also save virtual ip to
/var/ipfire/loxilb/ipconfig, so rename ipconfig to
ipconfigfile.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:46 +00:00
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