Problem setting up a Debian Web proxy.
Hi to all,
I have created a Webproxy server with debian using squid and the below script:
#!/bin/sh
INTIF="eth0"
EXTIF="eth2"
#EXTIP="`/sbin/ifconfig eth2 | grep 'inet addr' | awk '{print $2}' | sed -e 's/$
/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_conntrack_irc
/sbin/modprobe iptable_nat
/sbin/modprobe ip_nat_ftp
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
iptables -P INPUT ACCEPT
iptables -F INPUT
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT
iptables -P FORWARD DROP
iptables -F FORWARD
iptables -t nat -F
iptables -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j$
iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
The web proxy is working fine, although as the same system is working as a Web Server also, the above script (as it starts the firewall) do not let the requests outside of my local network to go to the web server and they are stopped so the web proxy too.
How can I let all packet requests go in the web server?
Thank you in advance.
Costas.
|
Recent comments
2 days 11 hours ago
2 days 20 hours ago
2 days 23 hours ago
3 days 19 min ago
3 days 1 hour ago
3 days 3 hours ago
3 days 4 hours ago
3 days 6 hours ago
3 days 22 hours ago
3 days 22 hours ago