This can be achieved using iptables rules. But this may be complicated and you cannot do from the UI