How to add an iptables rule with source IP address
- by ???
I have a bash script that starts with this:
if [[ $EUID -ne 0 ]]; then
echo "Permission denied (are you root?)."
exit 1
elif [ $# -ne 1 ]
then
echo "Usage: install-nfs-server <client network/CIDR>"
echo "$ bash install-nfs-server 192.168.1.1/24"
exit 2
fi;
I then try to add the iptables rules for NFS as follows:
…