daclinux
(usa Suse)
Enviado em 03/12/2015 - 13:45h
Pessoal,
Boa tarde. Já tentei um monte de coisas e não funcionou. Confesso que não sou usuário avançado de iptables e estou me perdendo em alguma coisa. Preciso liberar as máquinas da minha rede local para acessar um servidor remoto na porta 5003.
/etc/sysconfig/iptables :
# Completed on Mon Oct 26 10:35:20 2015
# Generated by iptables-save v1.4.7 on Mon Oct 26 10:35:20 2015
*filter
:INPUT DROP [0:0]
:FORWARD DROP [236:12060]
:OUTPUT ACCEPT [9547:13141729]
-A INPUT -s 10.0.0.0/8 -i ppp0 -j DROP
-A INPUT -s 192.168.0.0/24 -i ppp0 -j DROP
-A INPUT -s 172.16.0.0/12 -i ppp0 -j DROP
-A INPUT -i lo -j ACCEPT
-A INPUT -s 192.168.1.0/24 -i eth1 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 4922 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i ppp0 -m state --state INVALID -j DROP
-A FORWARD -i ppp0 -m state --state INVALID -j DROP
-A FORWARD -s 192.168.1.151/32 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -s 192.168.1.151/32 -p tcp -m tcp --dport 443 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 53 -j ACCEPT
-A FORWARD -p udp -m udp --dport 53 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 25 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 110 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 995 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 587 -j ACCEPT
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 7700 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 8800 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 8801 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 3456 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 3050 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 3059 -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 3306 -j ACCEPT
-A FORWARD -s 192.168.0.0/24 -d 192.168.10.1/32 -p udp -m udp --dport 53 -j ACCEPT
-A FORWARD -s 192.168.0.0/24 -d 192.168.10.1/32 -p udp -m udp --dport 53 -j ACCEPT
-A FORWARD -s 192.168.10.1/32 -d 192.168.0.0/24 -p udp -m udp --sport 53 -j ACCEPT
-A FORWARD -s 192.168.0.0/24 -p tcp -m tcp --dport 25 -j ACCEPT
-A FORWARD -s 192.168.0.0/24 -p tcp -m tcp --dport 110 -j ACCEPT
-A FORWARD -s 192.168.0.0/24 -p tcp -m tcp --dport 587 -j ACCEPT
-A FORWARD -p tcp -m tcp --sport 25 -j ACCEPT
-A FORWARD -p tcp -m tcp --sport 110 -j ACCEPT
-A FORWARD -p tcp -m tcp --sport 587 -j ACCEPT
COMMIT
# Completed on Mon Oct 26 10:35:20 2015
iptables -L:
Chain INPUT (policy DROP)
target prot opt source destination
DROP all -- 10.0.0.0/8 anywhere
DROP all -- 192.168.0.0/24 anywhere
DROP all -- 172.16.0.0/12 anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- 192.168.1.0/24 anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:4922
ACCEPT tcp -- anywhere anywhere tcp dpt:ndmp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere state INVALID
Chain FORWARD (policy DROP)
target prot opt source destination
DROP all -- anywhere anywhere state INVALID
ACCEPT tcp -- 192.168.1.151 anywhere tcp dpt:http
ACCEPT tcp -- 192.168.1.151 anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s
ACCEPT tcp -- anywhere anywhere tcp dpt:submission
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:em7-secom
ACCEPT tcp -- anywhere anywhere tcp dpt:sunwebadmin
ACCEPT tcp -- anywhere anywhere tcp dpt:8801
ACCEPT tcp -- anywhere anywhere tcp dpt:vat
ACCEPT tcp -- anywhere anywhere tcp dpt:gds_db
ACCEPT tcp -- anywhere anywhere tcp dpt:qsoft
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
ACCEPT udp -- 192.168.0.0/24 192.168.10.1 udp dpt:domain
ACCEPT udp -- 192.168.0.0/24 192.168.10.1 udp dpt:domain
ACCEPT udp -- 192.168.10.1 192.168.0.0/24 udp spt:domain
ACCEPT tcp -- 192.168.0.0/24 anywhere tcp dpt:smtp
ACCEPT tcp -- 192.168.0.0/24 anywhere tcp dpt:pop3
ACCEPT tcp -- 192.168.0.0/24 anywhere tcp dpt:submission
ACCEPT tcp -- anywhere anywhere tcp spt:smtp
ACCEPT tcp -- anywhere anywhere tcp spt:pop3
ACCEPT tcp -- anywhere anywhere tcp spt:submission
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Vocês podem me ajudar?
Obrigado,