Proxy Transaparente en suse

Para configurar un proxy transparente se debe implementar una solución que abarca tanto el archivo squid.conf como tu firewall.

en tu squid.conf deberás activar estas lineas
# HTTPD-ACCELERATOR OPTIONS
# -----------------------------------------------------------------------------

httpd_accel_host virtual
httpd_accel_port 80

# TAG: httpd_accel_with_proxy on|off

httpd_accel_with_proxy on

# TAG: httpd_accel_uses_host_header on|off

httpd_accel_uses_host_header on

y en tu firewall, debes poner estas líneas en la sección de tráfico web, si siempre se te salen a internet sin pasar por el proxy, es porque el firewall que usás o bien tiene habilitado el forwarding al puerto 80 o es un firewall con reglas por omisión a "todo permitido", debe ser con reglas "todo negado"

# Redirección de tráfico http a squid
$iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
# Redirección de tráfico gopher a squid
$iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 70 -j REDIRECT --to-port 3128
# Redirección de tráfico wais a squid
$iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 210 -j REDIRECT --to-port 3128

yo utilizo el eth0 como mi interfaz interna.

Comentarios

Las instrucciones que haz

Imagen de antares

Las instrucciones que haz puesto son aplicables para cualquier distro. Si querías hacer una guía para suse, en la parte de configuración del firewall debias utilizar las herramientas de Suse:

Debemos editar el archivo /etc/sysconfig/SuSEfirewall2 y buscamos la directriz # 15 (FW_REDIRECT)


## Type: string
#
# 15.)
# Which accesses to services should be redirected to a local port on
# the firewall machine?
#
# This option can be used to force all internal users to surf via
# your squid proxy, or transparently redirect incoming webtraffic to
# a secure webserver.
#
# Format: list of [,,[,dport[:lport]]
# Where protocol is either tcp or udp. dport is the original
# destination port and lport the port on the local machine to
# redirect the traffic to
#
# An exclamation mark in front of source or destination network
# means everything EXCEPT the specified network
#
# Example: "10.0.0.0/8,0/0,tcp,80,3128 0/0,172.20.1.1,tcp,80,8080"
#
# Note: contrary to previous SuSEfirewall2 versions it is no longer necessary
# to additionally open the local port

Para que luzca, por ejemplo:


FW_REDIRECT="172.16.0.0/12,0/0,tcp,80,3128"

Y al final reiniciamos el firewall


/etc/init.d/SuSEfirewall2_setup restart

Entonces sí, tenemos una guía para Suse. ;)

Saludos.

Saludos,

antares