title: how to open (range of ) ports using command line in amazon aws ec2 hosted ubuntu 12.04 server?
body: <p>I learn from Amazon AWS Console that, you can open port by using specific attached security group of an instance and by editing it you can directly alter the port available for communication as mentioned in <a href="https://stackoverflow.com/a/10454688/789745">https://stackoverflow.com/a/10454688/789745</a>.</p>
  
  <p>I'm wondering, if the above can be performed using command line?? I have tried using netstat, nmap, iptables. but not successful so far.</p>