If your server is running selinux then you can restrict httpd from making any outbound network connections with setsebool
Code:
[root@localhost ~]# setsebool -P httpd_can_network_connect off
From your firewall's point of view all it knows about is packets, both incomming and outgoing. It doesn't know what or who generates those packets so you have to set the restriction at the operating system level.