Fórum Root.cz
Hlavní témata => Sítě => Téma založeno: zaciatocnik 16. 04. 2014, 21:08:11
-
dobry vecer.
chcel by som poprosit o radu, nastavil som na servery (debian) firewall a nefunguje mi preklad adries na IP.
neviete v com by mohla byt chyba?
tu je zoznam pravidiel firewallu:
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-dovecot-pop3imap tcp -- anywhere anywhere multiport dports pop3,pop3s,imap2,imaps
fail2ban-pureftpd tcp -- anywhere anywhere multiport dports ftp
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
DROP tcp -- anywhere loopback/8
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
DROP all -- 224.0.0.0/4 anywhere
PUB_IN all -- anywhere anywhere
PUB_IN all -- anywhere anywhere
PUB_IN all -- anywhere anywhere
PUB_IN all -- anywhere anywhere
PUB_IN all -- anywhere anywhere
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
PUB_OUT all -- anywhere anywhere
PUB_OUT all -- anywhere anywhere
PUB_OUT all -- anywhere anywhere
PUB_OUT all -- anywhere anywhere
PUB_OUT all -- anywhere anywhere
Chain INT_IN (0 references)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere
DROP all -- anywhere anywhere
Chain INT_OUT (0 references)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain PAROLE (16 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain PUB_IN (5 references)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp echo-reply
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp echo-request
PAROLE tcp -- anywhere anywhere tcp dpt:ftp-data
PAROLE tcp -- anywhere anywhere tcp dpt:ftp
PAROLE tcp -- anywhere anywhere tcp dpt:ssh
PAROLE tcp -- anywhere anywhere tcp dpt:smtp
PAROLE tcp -- anywhere anywhere tcp dpt:domain
PAROLE tcp -- anywhere anywhere tcp dpt:http
PAROLE tcp -- anywhere anywhere tcp dpt:pop3
PAROLE tcp -- anywhere anywhere tcp dpt:imap2
PAROLE tcp -- anywhere anywhere tcp dpt:https
PAROLE tcp -- anywhere anywhere tcp dpt:ssmtp
PAROLE tcp -- anywhere anywhere tcp dpt:imaps
PAROLE tcp -- anywhere anywhere tcp dpt:pop3s
PAROLE tcp -- anywhere anywhere tcp dpt:mysql
PAROLE tcp -- anywhere anywhere tcp dpt:http-alt
PAROLE tcp -- anywhere anywhere tcp dpt:tproxy
PAROLE tcp -- anywhere anywhere tcp dpt:webmin
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:mysql
DROP icmp -- anywhere anywhere
DROP all -- anywhere anywhere
Chain PUB_OUT (5 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain fail2ban-dovecot-pop3imap (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-pureftpd (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
-
Nefunguje vám na tom serveru, nebo v nějaké síti, pro kterou dělá router? Zkoušel jste se tcpdumpem podívat, zda DNS požadavky odcházejí a zda se vrací odpovědi? Tenhle výpis firewallu není kompletní. Když se podíváte třeba na chain INPUT, opakují se tam řádky s PUB_IN. Ve skutečnosti jsou to nejspíš různá pravidla, jenže tenhle výpis nezobrazuje všechny podmínky. Zkuste je vypsat příkazem
iptables -nvL --line-numbers
Nikde v tom výpise nevidím povolení paketů s DNS odpovědí (zdrojový port 53), ale to samozřejmě může být tím, že nejsou vidět ta pravidla celá.
Jinak mi ta konfigurace na to, co to má dělat, připadá zbytečně složitá a kernel musí procházet spoustu zbytečných pravidel.
-
I z toho mala co je videt ... se ani moc nedivim ...
Dropovat provoz na loopbacku? WTF?
A pokud uz chces provozovat firewall, tak se nedava nakonec pravidlo dropujici cosi, ale nastavuje se policy na drop.
Mimochodem, ty chces poustet do sveta mysql?