Yes, the $true and $false should be swapped in the other post.
The following example seems to work for me, but you have to make sure the AllowedIPAddresses is not set to All when adding individual IP addresses.
Hence the $false as param 1 in the 1st line
$esxcli.network.firewall.ruleset.set($false,$true,'syslog')
$esxcli.network.firewall.ruleset.allowedip.add('192.168.1.1','syslog')
$esxcli.network.firewall.ruleset.allowedip.add('192.168.1.2','syslog')
$esxcli.network.firewall.ruleset.list('syslog')
$esxcli.network.firewall.ruleset.allowedip.list('syslog')