mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
Forward Firewall: adapted initscripts/firewall and wirelessctrl.c
Now the Wirelesschains should work with new firewall.
This commit is contained in:
committed by
Michael Tremer
parent
8139398721
commit
8dc23ff4fc
@@ -226,7 +226,7 @@ case "$1" in
|
||||
/sbin/iptables -N WIRELESSINPUT
|
||||
/sbin/iptables -A INPUT -m state --state NEW -j WIRELESSINPUT
|
||||
/sbin/iptables -N WIRELESSFORWARD
|
||||
/sbin/iptables -A FORWARDFW -m state --state NEW -j WIRELESSFORWARD
|
||||
/sbin/iptables -A FORWARD -m state --state NEW -j WIRELESSFORWARD
|
||||
|
||||
# OPenSSL
|
||||
/sbin/iptables -N OPENSSLPHYSICAL
|
||||
|
||||
@@ -156,8 +156,8 @@ int main(void)
|
||||
safe_system(command);
|
||||
snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -s %s -i %s ! -o %s -j ACCEPT", macaddress, ipaddress, blue_dev, green_dev);
|
||||
safe_system(command);
|
||||
/*snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -s %s -i %s -j DMZHOLES", macaddress, ipaddress, blue_dev);
|
||||
safe_system(command);*/
|
||||
snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -s %s -i %s -j FORWARDFW", macaddress, ipaddress, blue_dev);
|
||||
safe_system(command);
|
||||
} else {
|
||||
|
||||
/* correctly formed mac address is 17 chars */
|
||||
@@ -166,8 +166,8 @@ int main(void)
|
||||
safe_system(command);
|
||||
snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -i %s ! -o %s -j ACCEPT", macaddress, blue_dev, green_dev);
|
||||
safe_system(command);
|
||||
/*snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -i %s -j DMZHOLES", macaddress, blue_dev);
|
||||
safe_system(command);*/
|
||||
snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -i %s -j FORWARDFW", macaddress, blue_dev);
|
||||
safe_system(command);
|
||||
}
|
||||
|
||||
if (VALID_IP_AND_MASK(ipaddress)) {
|
||||
@@ -175,8 +175,8 @@ int main(void)
|
||||
safe_system(command);
|
||||
snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -s %s -i %s ! -o %s -j ACCEPT", ipaddress, blue_dev, green_dev);
|
||||
safe_system(command);
|
||||
/*snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -s %s -i %s -j DMZHOLES", ipaddress, blue_dev);
|
||||
safe_system(command);*/
|
||||
snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -s %s -i %s -j FORWARDFW", ipaddress, blue_dev);
|
||||
safe_system(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user