Replace 1.2.3.4 with your actual IP (add the following to your shell script)
Code:
iptables -A INPUT -p tcp --destination-port 9999 -d \! 1.2.3.4 -j DROP
iptables -A INPUT -p tcp --destination-port 22 -d \! 1.2.3.4 -j DROP
service iptables save
Do you have shell script based firewall?
__________________
Vivek Gite
Linux Evangelist

Be proud
RHEL user, and let the world know about your enterprise choices!
Join RedHat user group.

Always use
CODE tags for posting system output and commands!

Do you run a Linux? Let's face it,
you need help