Customizing Iptables on Dedicated causes syntax error?

vps

#1

Is there a specific procedure for editing the /var/lib/iptables/my.rules file? We added the policies below to /var/lib/iptables/my.rules. But when the iptables service (service nvm_iptables restart) is restarted, a syntax error is thrown regarding the /var/lib/iptables/my.rules file. The policies below are what was added to the my.rules file:

iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 150 -j DROP
iptables -A INPUT -p tcp –-syn –-dport 80 -m connlimit –-connlimit-above 20 --connlimit-mask 32 -j DROP
# iptables -A INPUT -p tcp --dport 80 -m state --state RELATED,ESTABLISHED -m limit --limit 150/second --limit-burst 160 -j ACCEPT
iptables -A INPUT -p tcp --syn --dport 443 -m connlimit --connlimit-above 150 -j DROP
iptables -A INPUT -p tcp –-syn –-dport 443 -m connlimit –-connlimit-above 20 --connlimit-mask 32 -j DROP
# iptables -A INPUT -p tcp --dport 443 -m state --state RELATED,ESTABLISHED -m limit --limit 150/second --limit-burst 160 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
COMMIT

#2

I’m no iptables expert, so hopefully someone else can chime in: maybe iptables in your server is missing the connlimit extension?