<div>Hi,</div><div><br></div><div>I am trying to configure firewall using ufw and getting following errors: </div><div>{{{</div><div>bitnami@linux:~$ sudo ufw insert 1 allow from <a href="http://10.0.0.0/255.255.0.0">10.0.0.0/255.255.0.0</a> to tcp port 22</div>
<div>ERROR: Bad destination address</div><div>bitnami@linux:~$ sudo ufw allow port 22</div><div>ERROR: Need 'to' or 'from' clause</div><div>}}}</div><div><br></div><div>I am not sure what mistake I did in above command, but clearly I am missing something in the syntax with from/to/port. </div>
<div><br></div><div>I ended up using iptables commands to add desired rule. </div><div>{{{</div><div>bitnami@linux:~$ sudo iptables -A INPUT -m tcp -p tcp -s <a href="http://10.0.0.0/16">10.0.0.0/16</a> --dport 22 -j ACCEPT </div>
<div>bitnami@linux:~$ sudo /sbin/iptables-save </div><div>}}}</div><div><br></div><div>Any help with ufw syntax will be really helpful. </div><div><br></div><div>--</div><div>Thanks,</div><div>Shantanu.</div>