PDA

Bekijk Volledige Versie : Hulp bij ipv6 rules/config



janton
13/07/12, 12:37
Hoi All,

In het verleden heb ik ipv6 geblocked, omdat ik hier weinig mee deed en het mij destijds een verstandige keuzen leek:
http://www.webhostingtalk.nl/beveiliging/158897-ipv6-uitschakelen-disable-lukt-niet.html

Hiermee heb ik het een langetijd goed volgehouden en was tevreden. Maar nu moet ik op één van mijn websites communiceren met een youtube API en die is ipv6. :innocent:

Dus ik heb tijdelijk alle toegang op mijn ipv6 toegestaan:
ip6tables -P INPUT ACCEPT
ip6tables -P OUTPUT ACCEPT
ip6tables -P FORWARD ACCEPT

En de API met youtube werkt perfect! :D
Nu moet ik dus iets bedenken om ipv6 dus toe te staan en dacht dan toch CSF hiervoor te gebruiken.. aangezien ik die toch al gebruik voor ipv4 en al jaren goed draait. (ik update CSF altijd en ipv6 is nu ook mogelijk)


Ik heb besloten CSF de ipv6 firewall aan te schakelen, zie hieronder:
--------->
IPV6 = 1
IPV6_ICMP_STRICT = 0

IPV6_SPI = 0

TCP6_IN = 22,25,53,80,110,143,443,465,587

TCP6_OUT = 0:65535

UDP6_IN = 53

UDP6_OUT = 0:65535
<------------------


maar nu... ik probeer contact te maken met youtube:
telnet youtube.com 80
Trying 2a00:1450:4001:c01::5b...

*geen reactie.... nada niks.. ook met de API en mijn script gebeurt er niks.

Ik dacht dat ik met "TCP6_OUT = 0:65535" wel contact kon maken! (*omdat ik een kernel heb ouder dan 2.6.20)
(Ik heb nog niet "query-source-v6 port 53;" toegevoegd aan named.conf )

ip6tables -L


Chain INPUT (policy DROP)
target prot opt source destination
LOCALINPUT all anywhere anywhere
ACCEPT all anywhere anywhere
ACCEPT tcp anywhere anywhere tcp dpt:ssh
ACCEPT tcp anywhere anywhere tcp dpt:smtp
ACCEPT tcp anywhere anywhere tcp dpt:domain
ACCEPT tcp anywhere anywhere tcp dpt:http
ACCEPT tcp anywhere anywhere tcp dpt:pop3
ACCEPT tcp anywhere anywhere tcp dpt:imap
ACCEPT tcp anywhere anywhere tcp dpt:https
ACCEPT tcp anywhere anywhere tcp dpt:smtps
ACCEPT tcp anywhere anywhere tcp dpt:submission
ACCEPT udp anywhere anywhere udp dpt:domain
ACCEPT ipv6-icmp anywhere anywhere
LOGDROPIN all anywhere anywhere

Chain FORWARD (policy DROP)
target prot opt source destination

Chain OUTPUT (policy DROP)
target prot opt source destination
LOCALOUTPUT all anywhere anywhere
ACCEPT tcp anywhere anywhere tcp dpt:domain
ACCEPT udp anywhere anywhere udp dpt:domain
ACCEPT tcp anywhere anywhere tcp spt:domain
ACCEPT udp anywhere anywhere udp spt:domain
ACCEPT all anywhere anywhere
ACCEPT tcp anywhere anywhere tcp
ACCEPT udp anywhere anywhere udp
ACCEPT ipv6-icmp anywhere anywhere
LOGDROPOUT all anywhere anywhere

Chain LOCALINPUT (1 references)
target prot opt source destination

Chain LOCALOUTPUT (1 references)
target prot opt source destination

Chain LOGDROPIN (1 references)
target prot opt source destination
DROP tcp anywhere anywhere tcp dpt:bootps
DROP udp anywhere anywhere udp dpt:bootps
DROP tcp anywhere anywhere tcp dpt:bootpc
DROP udp anywhere anywhere udp dpt:bootpc
DROP tcp anywhere anywhere tcp dpt:sunrpc
DROP udp anywhere anywhere udp dpt:sunrpc
DROP tcp anywhere anywhere tcp dpt:auth
DROP udp anywhere anywhere udp dpt:auth
DROP tcp anywhere anywhere tcp dpts:epmap:netbios-ssn
DROP udp anywhere anywhere udp dpts:epmap:netbios-ssn
DROP tcp anywhere anywhere tcp dpt:microsoft-ds
DROP udp anywhere anywhere udp dpt:microsoft-ds
DROP tcp anywhere anywhere tcp dpt:login
DROP udp anywhere anywhere udp dpt:who
DROP tcp anywhere anywhere tcp dpt:efs
DROP udp anywhere anywhere udp dpt:router
LOG tcp anywhere anywhere limit: avg 30/min burst 5 LOG level warning prefix `Firewall: *TCP6IN Blocked* '
LOG udp anywhere anywhere limit: avg 30/min burst 5 LOG level warning prefix `Firewall: *UDP6IN Blocked* '
LOG ipv6-icmp anywhere anywhere limit: avg 30/min burst 5 LOG level warning prefix `Firewall: *ICMP6IN Blocked* '
DROP all anywhere anywhere

Chain LOGDROPOUT (1 references)
target prot opt source destination
LOG tcp anywhere anywhere limit: avg 30/min burst 5 LOG level warning prefix `Firewall: *TCP6OUT Blocked* '
LOG udp anywhere anywhere limit: avg 30/min burst 5 LOG level warning prefix `Firewall: *UDP6OUT Blocked* '
LOG ipv6-icmp anywhere anywhere limit: avg 30/min burst 5 LOG level warning prefix `Firewall: *ICMP6OUT Blocked* '
DROP all anywhere anywhere