Hola amigos,
Alguien por aca podría ayudarme en este scritp de iptables, el tema es
que no esta redireccionando el trafico del puerto 80 hacia el servidor
de hosting.
S.O: Debian 9 (Virtualizado por Container en Proxmox)
***********************************************************************
*********************
#!/bin/sh
## FLUSH de reglas
iptables -F
iptables -X
iptables -Z
iptables -t nat -F
iptables -t nat -X
## ESTABLECEMOS POLITICAS POR DEFECTO
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
## VARIABLES
## Nota: eth0 es el interfaz conectado al ROUTER (WAN) y eth1 a la LAN
EXTERNAL=eth0
INTERNAL=eth1
RED_WAN=172.16.0.0/16
IP_WAN=172.16.14.4
RED_LAN=192.168.100.0/24
IP_LAN=192.168.100.244
IP_ADMINRED=192.168.100.20
SRV_HTTP=192.168.100.7
#########################
## EMPEZAMOS A FILTRAR ##
######################################
## POLITICIAS INTERNAS DEL FIREWALL ##
######################################
# Activar el BIT DE FORWARDING
echo 1 > /proc/sys/net/ipv4/ip_forward
# Acceso total desde el localhost
iptables -A INPUT -i lo -j ACCEPT
# Aceptamos paquetes que tienen estado relacionados y establecidos
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Enmascaramiento de la red local
iptables -t nat -A POSTROUTING -s $IP_ADMINRED -o $IP_WAN -j SNAT --to
$IP_WAN
###############################################
## ACCESO DE LOS ADMINISTRADORES AL FIREWALL ##
###############################################
iptables -A INPUT -s $IP_ADMINRED -j ACCEPT
###########################
### REDIRECCIONAMIENTOS ###
###########################
# Accesos desde la red externa al servidor hosting
iptables -t nat -A PREROUTING -i $IP_WAN -p tcp --dport 80 -j DNAT --to
$SRV_HTTP:80
[...]
***********************************************************************
*********************
--
Lic. Alexis Verano GonzálezEsp. A Ciencias Informáticas | Administrador de
REDGrupo Empresarial de Servicios de Transporte Automotor "GEA"Ministerio de
TransporteCorreo-e: alexis.verano@gea.transnet.cuWeb:
https://www.gea.transnet.cuTel: (+53) 7881-9057 | (+53) 5 994-6579
---
<br>
Somos el GEA, Grupo Empresarial de Servicios de Transporte Automotor
perfeccionado.
<br>
Visítenos en: <a
href="https://www.gea.transnet.cu">https://www.gea.transnet.cu</a>
<br>
_______________________________________________
Gutl-l mailing list -- gutl-l@listas.jovenclub.cu
To unsubscribe send an email to gutl-l-le...@listas.jovenclub.cu