nmap external localhost with iptables

view full story

http://serverfault.com – I have a status monitor that I wish to set up using nmap to show all my externally open ports. Naturally nmap came to mind. Unfortunately I use an iptables firewall and allow all traffic on the loopback interface. I want this and need this, as I might be doing web development on apache for instance. I do not want that port open to the outside world all the time (sometimes I do), and there are multiple services I do this for so just setting them to listen on the loopback interface might be too cumbersome. I was hoping there was a way to scan nmap on the same computer without involving anot (HowTos)