mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-19 15:32:59 +02:00
Forward Firewall: build iso with new firewall
This commit is contained in:
committed by
Michael Tremer
parent
d24a34cbdc
commit
231499fcc8
@@ -195,14 +195,14 @@ case "$1" in
|
||||
# Outgoing Firewall
|
||||
/sbin/iptables -A FORWARD -j OUTGOINGFWMAC
|
||||
|
||||
# Forward Firewall
|
||||
/sbin/iptables -N FORWARDFW
|
||||
/sbin/iptables -A FORWARD -j FORWARDFW
|
||||
|
||||
# Input Firewall
|
||||
/sbin/iptables -N INPUTFW
|
||||
/sbin/iptables -A INPUT -m state --state NEW -j INPUTFW
|
||||
|
||||
# Forward Firewall
|
||||
/sbin/iptables -N FORWARDFW
|
||||
/sbin/iptables -A FORWARD -j FORWARDFW
|
||||
|
||||
# Input Firewall
|
||||
/sbin/iptables -N INPUTFW
|
||||
/sbin/iptables -A INPUT -m state --state NEW -j INPUTFW
|
||||
|
||||
# localhost and ethernet.
|
||||
/sbin/iptables -A INPUT -i lo -m state --state NEW -j ACCEPT
|
||||
/sbin/iptables -A INPUT -s 127.0.0.0/8 -m state --state NEW -j DROP # Loopback not on lo
|
||||
|
||||
@@ -28,7 +28,7 @@ SUID_PROGS = setportfw \
|
||||
squidctrl sshctrl ipfirereboot \
|
||||
ipsecctrl timectrl dhcpctrl snortctrl \
|
||||
applejuicectrl rebuildhosts backupctrl \
|
||||
logwatch openvpnctrl outgoingfwctrl forwardfwctrl \
|
||||
logwatch openvpnctrl forwardfwctrl \
|
||||
wirelessctrl getipstat qosctrl launch-ether-wake \
|
||||
redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
|
||||
smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \
|
||||
@@ -86,13 +86,10 @@ smartctrl: smartctrl.c setuid.o ../install+setup/libsmooth/varval.o
|
||||
|
||||
clamavctrl: clamavctrl.c setuid.o ../install+setup/libsmooth/varval.o
|
||||
$(COMPILE) -I../install+setup/libsmooth/ clamavctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
||||
|
||||
outgoingfwctrl: outgoingfwctrl.c setuid.o ../install+setup/libsmooth/varval.o
|
||||
$(COMPILE) -I../install+setup/libsmooth/ outgoingfwctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
||||
|
||||
|
||||
forwardfwctrl: forwardfwctrl.c setuid.o ../install+setup/libsmooth/varval.o
|
||||
$(COMPILE) -I../install+setup/libsmooth/ forwardfwctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
||||
|
||||
|
||||
timectrl: timectrl.c setuid.o ../install+setup/libsmooth/varval.o
|
||||
$(COMPILE) -I../install+setup/libsmooth/ timectrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
||||
|
||||
|
||||
@@ -18,7 +18,10 @@ int main(int argc, char *argv[]) {
|
||||
if (!(initsetuid()))
|
||||
exit(1);
|
||||
|
||||
safe_system("chmod 755 /var/ipfire/outgoing/bin/outgoingfw.pl");
|
||||
safe_system("/var/ipfire/outgoing/bin/outgoingfw.pl");
|
||||
if(argc > 1)
|
||||
safe_system("/var/ipfire/forward/bin/rules.pl flush");
|
||||
else
|
||||
safe_system("/var/ipfire/forward/bin/rules.pl");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user