ndelo
03-01-2001, 01:52 PM
I am currently (and unsuccessfully) trying to set up tproxy on my firewall. I would like to redirect specific web traffic originating from our LAN to a web server in our DMZ. In other words, the firewall should grab outbound traffic destined for it's external ip address, port 80, and redirect it to a local web server sitting in our DMZ.
The reason I'm doing this is because ipmasqadm portfw only works for packets being forwaded. Since packets originating from the LAN destined for the firewall's external IP do not need to be forwaded (the packet remains inside the firewall), portfw never sees them. In effect, LAN users cannot access the DMZ webserver by its url.
At the firewall I have masquerading/portforwarding set up as such:
ipmasqadm portfw -a -P tcp -L $EXTERNAL_NIC_IP 80 -R $DMZ_WEB_SERVER_IP 80
This works great for requests from the internet. But not for LAN users. As a workaround, I'm trying to have the firewall's internal NIC grab outbound packets destined for port 80 of the external interface and redirect them to tproxy. I'm hoping tproxy will then pass requests to the DMZ webserver. My rules are this:
tproxy -s 81 -r nobody $WEB_SERVER 80
ipchains -A input -i $INETRNAL_INTERFACE -p tcp -d $EXTERNAL_INTERFACE_IP 80 -j REDIRECT 81
I have support for transparent proxying compiled into the kernel. I also have tproxy installed and listed in /etc/services as being 81/tcp. However, when I try to asccess the web server by its url, I get the following error message:
Forbidden
you don't have permission to access to http://(theexternal ip of my firewall) on this server
Apache/1.3.12 Server at (the hostname of my DMZ web server) Port 80
I would like to believe it's half working since the ip listed is the external ip of the firewall and the hostname and message is from Apache running on the web server. (Apache is not at all running on the firewall). I can access the web server by typing it's real IP into my brower, but not by url, since our ISP's nameservers resolve it to the firewall's external ip address.
This is my first shot at proxying. Any help would be appreciated.
[ 01 March 2001: Message edited by: ndelo ]
The reason I'm doing this is because ipmasqadm portfw only works for packets being forwaded. Since packets originating from the LAN destined for the firewall's external IP do not need to be forwaded (the packet remains inside the firewall), portfw never sees them. In effect, LAN users cannot access the DMZ webserver by its url.
At the firewall I have masquerading/portforwarding set up as such:
ipmasqadm portfw -a -P tcp -L $EXTERNAL_NIC_IP 80 -R $DMZ_WEB_SERVER_IP 80
This works great for requests from the internet. But not for LAN users. As a workaround, I'm trying to have the firewall's internal NIC grab outbound packets destined for port 80 of the external interface and redirect them to tproxy. I'm hoping tproxy will then pass requests to the DMZ webserver. My rules are this:
tproxy -s 81 -r nobody $WEB_SERVER 80
ipchains -A input -i $INETRNAL_INTERFACE -p tcp -d $EXTERNAL_INTERFACE_IP 80 -j REDIRECT 81
I have support for transparent proxying compiled into the kernel. I also have tproxy installed and listed in /etc/services as being 81/tcp. However, when I try to asccess the web server by its url, I get the following error message:
Forbidden
you don't have permission to access to http://(theexternal ip of my firewall) on this server
Apache/1.3.12 Server at (the hostname of my DMZ web server) Port 80
I would like to believe it's half working since the ip listed is the external ip of the firewall and the hostname and message is from Apache running on the web server. (Apache is not at all running on the firewall). I can access the web server by typing it's real IP into my brower, but not by url, since our ISP's nameservers resolve it to the firewall's external ip address.
This is my first shot at proxying. Any help would be appreciated.
[ 01 March 2001: Message edited by: ndelo ]