Fix double line removal
fix perl warning
Fix parsing of allowed IPs
fix perms