I see one glaring error in the firewall. This line:
When specifying an TCP/IP network in Linux (and on many other systems) when you tell the script the IP network you are running on, you also tell it what your subnet mask is (what this script refers to as your "netmask"). This is done by specifying in this format on Linux:
"first octet" . "second octet" . "third octet" . "fourth octet" (in most cases zero) / "netmask bit value"
IP addresses are 32 bits long, or four bytes. Your netmask refers to how many of these bits are "borrowed" in the creation of subnets. Thus, a /24 details a regular class C address of mask 255.255.255.0 with no bits borrowed, and no subnets created. If I were to change this to /27 (subnet mask of 255.255.255.224), this would mean that I am borrowing 27 bits from the available address space, making eight subnets (numSubnets = 2 ^ bitsBorrowed) [I will admit, it has been awhile since I had opportunity to play with this stuff, so this may be a bit off...].
Now, your script is saying that you are borrowing 150 bits, which is 118 bits larger than an IP address. This will cause problems. Unless you have reason to split up the computers onto different subnets, changing this to 192.168.1.0/24 should not cause any problems whatsoever. If you do need to create subnets, remember these formulas for determining how many, and what interval:
numSubnets = 2 ^ bitsBorrowed
subnetInterval = 2 ^ bitsRemaining
Note 1: with your situation, using class C addressing space, this process is fairly straight forward. Your first subnet will start on .0 and end on .31. It is less intuitively obvious with larger classes (C only allows for 256 available addresses).
Note 2: When creating subnets, you will have two unusable subnets. These are the first one, which starts at .0 and ends on .(2^bitsRemaining - 1) and the last, which ends on .255, which is reserved as a broadcast address.
Most of this is probably superfluous to your situation, but hey, theres a free lesson in network theory