Forums:
Estimados de Ecualug
La presente es para que me ayuden configurando mis regla iptables, quiero abrir el puerto 1433 apuntando a mi servidor de produccion les copio mi tabla.
es en mi nuevo centos 7
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -i enp2s0 -p tcp --dport 1433 -j DNAT --to-destination 192.168.0.1:1433
COMMIT
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 22 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 3128 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 25 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 587 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 80 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 81 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 110 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 143 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 389 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 443 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 465 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 993 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 995 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 7071 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 7072 --state NEW -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1433 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Tue Feb 3 21:39:23 2015
# Generated by webmin
#*mangle
#:FORWARD ACCEPT [0:0]
#:INPUT ACCEPT [0:0]
#:OUTPUT ACCEPT [0:0]
#:PREROUTING ACCEPT [0:0]
#:POSTROUTING ACCEPT [0:0]
#COMMIT
# Completed
Centos 7 no usa iptables
Centos 7 no usa iptables-services, usa firewalld, aunque ambos usan el mismo comando iptables, al borrar las zonas podrías crear conflicto con la configuración de firewalld.
Te recomiendo que aprendas a usar firewalld-cmd o que lo desinstales y uses iptables a secas. En todo caso para abrir el pureto 443
iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT
no olvidar guardar los cambios con services iptables save, esto no funcionará si no instalas iptables-services
Saludos.!
------------

Cogito Ergo Sum
firewall
osea que para que mi regla iptable funcione debo bajar el firewall y configurarlos a mi gusto
tienes varias opciones, si x
tienes varias opciones, si x default instalaste centos no te vienen los services iptables, q son requeridos para funcionar, entonces si vas a usar iptables en vez de firewalld:
yum install iptables-services
systemctl stop firewalld
chkconfig firewalld off
chkconfig iptables on
systemctl enable iptables
/path/to_scrip/firewall.sh
/usr/libexec/iptables/iptables.init save
systemctl start iptables
es todo!
iptalbles
Quiere decir que mi table de iptables esta bien o le falta algo.