Milí majitelé routerů Turris,
toto fórum bylo 9. 12. 2016 zmrazeno a nahrazeno naším novým Turris fórem. Ještě chvíli bude dostupné k prohlížení, ale již zde není možné přispívat. Více informací naleznete v oznámení o uzavření fóra.
Dear Turris routers users,
this forum has been frozen on Dec 9th, 2016 and replaced by our new Turris forum. It will be read-only accessible for some time after. For more information, read the announcement about closing the forum.
/etc/git-version
?iptables-save
cat /etc/config/firewall
cat /etc/config/network
-A OUTPUT -j delegate_output -A accept -j turris -A accept -j ACCEPT -A delegate_forward -m comment --comment "user chain for forwarding" -j forwarding_rule -A delegate_forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A delegate_forward -i br-lan -j zone_lan_forward -A delegate_forward -i eth2 -j zone_wan_forward -A delegate_forward -j reject -A delegate_input -i lo -j ACCEPT -A delegate_input -m comment --comment "user chain for input" -j input_rule -A delegate_input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A delegate_input -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j syn_flood -A delegate_input -j ucollect_fake_accept -A delegate_input -i br-lan -j zone_lan_input -A delegate_input -i eth2 -j zone_wan_input -A delegate_input -j accept -A delegate_output -o lo -j ACCEPT -A delegate_output -m comment --comment "user chain for output" -j output_rule -A delegate_output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A delegate_output -o br-lan -j zone_lan_output -A delegate_output -o eth2 -j zone_wan_output -A delegate_output -j accept -A drop -j turris-log-incoming -A drop -j DROP -A forwarding_rule -j turris-nflog -A input_rule -j turris-nflog -A output_rule -j turris-nflog -A reject -j turris-log-incoming -A reject -j ucollect_fake -A reject -p tcp -j REJECT --reject-with tcp-reset -A reject -j REJECT --reject-with icmp-port-unreachable -A syn_flood -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m limit --limit 25/sec --limit-burst 50 -j RETURN -A syn_flood -j DROP -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00005E11_l_a_4_X dst -j LOG --log-prefix "turris-00005E11: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00005E11_l_a_4_X src -j LOG --log-prefix "turris-00005E11: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_000FA4E1_l_a_4_X dst -j LOG --log-prefix "turris-000FA4E1: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_000FA4E1_l_a_4_X src -j LOG --log-prefix "turris-000FA4E1: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00415B11_l_a_4_X dst -j LOG --log-prefix "turris-00415B11: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00415B11_l_a_4_X src -j LOG --log-prefix "turris-00415B11: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00557B71_l_ap_4_X dst,dst -j LOG --log-prefix "turris-00557B71: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00557B71_l_ap_4_X src,src -j LOG --log-prefix "turris-00557B71: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_009A7E41_l_a_4_X dst -j LOG --log-prefix "turris-009A7E41: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_009A7E41_l_a_4_X src -j LOG --log-prefix "turris-009A7E41: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00A07051_l_a_4_X dst -j LOG --log-prefix "turris-00A07051: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00A07051_l_a_4_X src -j LOG --log-prefix "turris-00A07051: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00A704A1_l_a_4_X dst -j LOG --log-prefix "turris-00A704A1: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00A704A1_l_a_4_X src -j LOG --log-prefix "turris-00A704A1: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00CE6701_l_a_4_X dst -j LOG --log-prefix "turris-00CE6701: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00CE6701_l_a_4_X src -j LOG --log-prefix "turris-00CE6701: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00D05711_l_a_4_X dst -j LOG --log-prefix "turris-00D05711: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00D05711_l_a_4_X src -j LOG --log-prefix "turris-00D05711: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00DEAD51_l_a_4_X dst -j LOG --log-prefix "turris-00DEAD51: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00DEAD51_l_a_4_X src -j LOG --log-prefix "turris-00DEAD51: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00DEB060_lb_a_4_X dst -j LOG --log-prefix "turris-00DEB060: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00DEB060_lb_a_4_X src -j LOG --log-prefix "turris-00DEB060: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_00FE0D01_l_a_4_X dst -j LOG --log-prefix "turris-00FE0D01: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_00FE0D01_l_a_4_X src -j LOG --log-prefix "turris-00FE0D01: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_047C0DE1_l_a_4_X dst -j LOG --log-prefix "turris-047C0DE1: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_047C0DE1_l_a_4_X src -j LOG --log-prefix "turris-047C0DE1: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_06E7E701_l_a_4_X dst -j LOG --log-prefix "turris-06E7E701: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_06E7E701_l_a_4_X src -j LOG --log-prefix "turris-06E7E701: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_07E7E411_l_a_4_X dst -j LOG --log-prefix "turris-07E7E411: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_07E7E411_l_a_4_X src -j LOG --log-prefix "turris-07E7E411: " --log-level 7 -A turris -o eth2 -m limit --limit 1/sec -m set --match-set turris_0A566041_l_ap_4_X dst,dst -j LOG --log-prefix "turris-0A566041: " --log-level 7 -A turris -i eth2 -m limit --limit 1/sec -m set --match-set turris_0A566041_l_ap_4_X src,src -j LOG --log-prefix "turris-0A566041: " --log-level 7 -A turris -o eth2 -m set --match-set turris_00DEB060_lb_a_4_X dst -j DROP -A turris -i eth2 -m set --match-set turris_00DEB060_lb_a_4_X src -j DROP -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00005E11_l_a_4_X src -j LOG --log-prefix "turris-00005E11: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_000FA4E1_l_a_4_X src -j LOG --log-prefix "turris-000FA4E1: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00415B11_l_a_4_X src -j LOG --log-prefix "turris-00415B11: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00557B71_l_ap_4_X src,src -j LOG --log-prefix "turris-00557B71: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_009A7E41_l_a_4_X src -j LOG --log-prefix "turris-009A7E41: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00A07051_l_a_4_X src -j LOG --log-prefix "turris-00A07051: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00A704A1_l_a_4_X src -j LOG --log-prefix "turris-00A704A1: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00CE6701_l_a_4_X src -j LOG --log-prefix "turris-00CE6701: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00D05711_l_a_4_X src -j LOG --log-prefix "turris-00D05711: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00DEAD51_l_a_4_X src -j LOG --log-prefix "turris-00DEAD51: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00DEB060_lb_a_4_X src -j LOG --log-prefix "turris-00DEB060: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_00FE0D01_l_a_4_X src -j LOG --log-prefix "turris-00FE0D01: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_047C0DE1_l_a_4_X src -j LOG --log-prefix "turris-047C0DE1: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_06E7E701_l_a_4_X src -j LOG --log-prefix "turris-06E7E701: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_07E7E411_l_a_4_X src -j LOG --log-prefix "turris-07E7E411: " --log-level 7 -A turris-log-incoming -i eth2 -m limit --limit 1/sec -m set --match-set turris_0A566041_l_ap_4_X src,src -j LOG --log-prefix "turris-0A566041: " --log-level 7 -A turris-log-incoming -i eth2 -m set --match-set turris_00005E11_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_000FA4E1_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00415B11_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00557B71_l_ap_4_X src,src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_009A7E41_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00A07051_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00A704A1_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00CE6701_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00D05711_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00DEAD51_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00DEB060_lb_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_00FE0D01_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_047C0DE1_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_06E7E701_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_07E7E411_l_a_4_X src -j RETURN -A turris-log-incoming -i eth2 -m set --match-set turris_0A566041_l_ap_4_X src,src -j RETURN -A turris-log-incoming -m limit --limit 1/sec --limit-burst 500 -j LOG --log-prefix "turris-00000000: " --log-level 7 -A ucollect_fake -m mark --mark 0x80000/0xc0000 -m limit --limit 100/sec --limit-burst 200 -j LOG --log-prefix "ucollect-fake-open-inet: " --log-level 7 -A ucollect_fake -m mark --mark 0x80000/0xc0000 -j DROP -A ucollect_fake_accept -p tcp -m tcp --dport 1392 -m mark --mark 0xc0000/0xc0000 -j ACCEPT -A zone_lan_dest_accept -o br-lan -j accept -A zone_lan_forward -m comment --comment "user chain for forwarding" -j forwarding_lan_rule -A zone_lan_forward -p tcp -m comment --comment xx -j zone_wan_dest_accept -A zone_lan_forward -p udp -m comment --comment xx -j zone_wan_dest_accept -A zone_lan_forward -m comment --comment "forwarding lan -> wan" -j zone_wan_dest_accept -A zone_lan_forward -m conntrack --ctstate DNAT -m comment --comment "Accept port forwards" -j accept -A zone_lan_forward -j zone_lan_dest_accept -A zone_lan_input -m comment --comment "user chain for input" -j input_lan_rule -A zone_lan_input -m conntrack --ctstate DNAT -m comment --comment "Accept port redirections" -j accept -A zone_lan_input -j zone_lan_src_accept -A zone_lan_output -m comment --comment "user chain for output" -j output_lan_rule -A zone_lan_output -j zone_lan_dest_accept -A zone_lan_src_accept -i br-lan -j accept -A zone_wan_dest_REJECT -o eth2 -j reject -A zone_wan_dest_accept -o eth2 -j accept -A zone_wan_forward -j MINIUPNPD -A zone_wan_forward -m comment --comment "user chain for forwarding" -j forwarding_wan_rule -A zone_wan_forward -m conntrack --ctstate DNAT -m comment --comment "Accept port forwards" -j accept -A zone_wan_forward -j zone_wan_dest_REJECT -A zone_wan_input -m comment --comment "user chain for input" -j input_wan_rule -A zone_wan_input -p udp -m udp --dport 68 -m comment --comment Allow-DHCP-Renew -j accept -A zone_wan_input -p icmp -m icmp --icmp-type 8 -m comment --comment Allow-Ping -j accept -A zone_wan_input -p tcp -m tcp --dport 80 -m comment --comment web -j accept -A zone_wan_input -p tcp -m tcp --dport 53 -m comment --comment dns -j DROP -A zone_wan_input -p udp -m udp --dport 53 -m comment --comment dns -j DROP -A zone_wan_input -m conntrack --ctstate DNAT -m comment --comment "Accept port redirections" -j accept -A zone_wan_input -j zone_wan_src_accept -A zone_wan_output -m comment --comment "user chain for output" -j output_wan_rule -A zone_wan_output -j zone_wan_dest_accept -A zone_wan_src_accept -i eth2 -j accept COMMIT # Completed on Mon Nov 30 12:50:08 2015 # Generated by iptables-save v1.4.21 on Mon Nov 30 12:50:08 2015 *raw :PREROUTING ACCEPT [8997094:6595628099] :OUTPUT ACCEPT [120999:20815974] :delegate_notrack - [0:0] -A PREROUTING -j delegate_notrack COMMIT # Completed on Mon Nov 30 12:50:08 2015
root@turris:~# cat /etc/config/firewall config defaults option syn_flood '1' option input 'ACCEPT' option output 'ACCEPT' option forward 'REJECT' config zone option name 'lan' list network 'lan' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' config zone option name 'wan' list network 'wan' list network 'wan6' option output 'ACCEPT' option forward 'REJECT' option masq '1' option mtu_fix '1' option input 'ACCEPT' config forwarding option src 'lan' option dest 'wan' config rule option name 'Allow-DHCP-Renew' option src 'wan' option proto 'udp' option dest_port '68' option target 'ACCEPT' option family 'ipv4' config rule option name 'Allow-Ping' option src 'wan' option proto 'icmp' option icmp_type 'echo-request' option family 'ipv4' option target 'ACCEPT' config rule option name 'Allow-DHCPv6' option src 'wan' option proto 'udp' option src_ip 'fe80::/10' option src_port '547' option dest_ip 'fe80::/10' option dest_port '546' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-ICMPv6-Input' option src 'wan' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' list icmp_type 'router-solicitation' list icmp_type 'neighbour-solicitation' list icmp_type 'router-advertisement' list icmp_type 'neighbour-advertisement' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-ICMPv6-Forward' option src 'wan' option dest '*' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT' config include option path '/etc/firewall.user' config include option path '/usr/share/firewall/turris' option reload '1' config include option path '/etc/firewall.d/with_reload/firewall.include.sh' option reload '1' config include option path '/etc/firewall.d/without_reload/firewall.include.sh' option reload '0' config include 'miniupnpd' option type 'script' option path '/usr/share/miniupnpd/firewall.include' option family 'IPv4' option reload '1' config rule option target 'ACCEPT' option src 'wan' option proto 'tcp' option dest_port '80' option name 'web' config rule option target 'ACCEPT' option proto 'tcp udp' option name 'xx' option src 'lan' option dest 'wan' config redirect option target 'DNAT' option src 'wan' option dest 'lan' option proto 'tcp udp' option src_dport '20-21' option dest_ip '192.168.1.249' option dest_port '20-21' option name 'MEDIA' config redirect option target 'DNAT' option src 'wan' option dest 'lan' option proto 'tcp' option src_dport '22' option dest_port '58732' option name 'SSH' config redirect option target 'DNAT' option src 'wan' option dest 'lan' option proto 'tcp' option dest_port '22' option name 'SSH redirect' option src_dport '2428' config rule option src 'wan' option proto 'tcp udp' option dest_port '53' option name 'dns' option target 'DROP'
root@turris:~# cat /etc/config/firewall config defaults option syn_flood '1' option input 'ACCEPT' option output 'ACCEPT' option forward 'REJECT' config zone option name 'lan' list network 'lan' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' config zone option name 'wan' list network 'wan' list network 'wan6' option output 'ACCEPT' option forward 'REJECT' option masq '1' option mtu_fix '1' option input 'ACCEPT' config forwarding option src 'lan' option dest 'wan' config rule option name 'Allow-DHCP-Renew' option src 'wan' option proto 'udp' option dest_port '68' option target 'ACCEPT' option family 'ipv4' config rule option name 'Allow-Ping' option src 'wan' option proto 'icmp' option icmp_type 'echo-request' option family 'ipv4' option target 'ACCEPT' config rule option name 'Allow-DHCPv6' option src 'wan' option proto 'udp' option src_ip 'fe80::/10' option src_port '547' option dest_ip 'fe80::/10' option dest_port '546' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-ICMPv6-Input' option src 'wan' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' list icmp_type 'router-solicitation' list icmp_type 'neighbour-solicitation' list icmp_type 'router-advertisement' list icmp_type 'neighbour-advertisement' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-ICMPv6-Forward' option src 'wan' option dest '*' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT' config include option path '/etc/firewall.user' config include option path '/usr/share/firewall/turris' option reload '1' config include option path '/etc/firewall.d/with_reload/firewall.include.sh' option reload '1' config include option path '/etc/firewall.d/without_reload/firewall.include.sh' option reload '0' config include 'miniupnpd' option type 'script' option path '/usr/share/miniupnpd/firewall.include' option family 'IPv4' option reload '1' config rule option target 'ACCEPT' option src 'wan' option proto 'tcp' option dest_port '80' option name 'web' config rule option target 'ACCEPT' option proto 'tcp udp' option name 'xx' option src 'lan' option dest 'wan' config redirect option target 'DNAT' option src 'wan' option dest 'lan' option proto 'tcp udp' option src_dport '20-21' option dest_ip '192.168.1.249' option dest_port '20-21' option name 'MEDIA' config redirect option target 'DNAT' option src 'wan' option dest 'lan' option proto 'tcp' option src_dport '22' option dest_port '58732' option name 'SSH' config redirect option target 'DNAT' option src 'wan' option dest 'lan' option proto 'tcp' option dest_port '22' option name 'SSH redirect' option src_dport '2428' config rule option src 'wan' option proto 'tcp udp' option dest_port '53' option name 'dns' option target 'DROP' root@turris:~# root@turris:~# cat /etc/config/network config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fdcd:4dd6:1a73::/48' config interface 'lan' option ifname 'eth0 eth1' option force_link '1' option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' option dns '172.20.3.126 8.8.8.8' config interface 'wan' option ifname 'eth2' option proto 'dhcp' option peerdns '0' option dns '172.20.3.126 8.8.8.8' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2 3 4 ' config switch_vlan option device 'switch0' option vlan '2' option ports '5 6'
config zone
option name 'wan'
list network 'wan'
list network 'wan6'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option input 'ACCEPT'
config zone
option name 'wan'
list network 'wan'
list network 'wan6'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option input 'REJECT'
uci set firewall.@zone[1].input=REJECT && uci commit
config rule
option name 'allow ssh in'
option src 'wan'
option dest_port '22'
option proto 'tcp'
option target 'ACCEPT'
Powered by mwForum 2.29.3 © 1999-2013 Markus Wichitill