I am using Gproxy software in my computer(Ubuntu 12.10). I want to allow incoming connection from only one IP adress,so that he can use internet. what settings should I configure in ufw firewall.
For UFW, you should make an Inbound rule which will allow you to accept connections via port 5123 (probably TCP and UDP).
For the record, and for those who use
sudo iptables -A INPUT -p tcp -s [SourceIP] --dport 5123 -j ACCEPT