Author
Message
DMSs DD-WRT Novice Joined: 03 Jul 2016 Posts: 15 Location: Russia
Posted: Thu Jan 11, 2018 5:35 Post subject: FW r34411 bug with port forwarding
Прошивка r34411 от 01-07-2018 имеет баг с port forwarding.
После прошивки TRENDnet TEW632brp перестаёт работать port forwarding.
После отката на предыдущую версию, работа проброса портов возобновилась.
FW 01-07-2018-r34411 have bug. On my TRENDnet TEW632brp not work port forwarding.
Back to top
Sponsor
vasek00 DD-WRT Guru Joined: 06 Nov 2010 Posts: 3312
Posted: Thu Jan 11, 2018 12:37 Post subject: Re: FW r34411 bug with port forwarding
Нужна выкладка по iptable с подтверждением данной проблемы на данном роутер.
Back to top
DMSs DD-WRT Novice Joined: 03 Jul 2016 Posts: 15 Location: Russia
Posted: Thu Jan 11, 2018 16:57 Post subject: Re: FW r34411 bug with port forwarding
vasek00 wrote: Нужна выкладка по iptable с подтверждением данной проблемы на данном роутер.
Завтра постараюсь сделать, сразу откатился на предыдущую версию на которой всё стабильно.
Back to top
DMSs DD-WRT Novice Joined: 03 Jul 2016 Posts: 15 Location: Russia
Posted: Sun Jan 21, 2018 9:39 Post subject: Re: FW r34411 bug with port forwarding
vasek00 wrote: Нужна выкладка по iptable с подтверждением данной проблемы на данном роутер.
попробовал прошивку 34578 от 19.01.2018 , точно такая же ситуация. Достучаться до сервисов (по имени, где имя привязано к белому IP, а далее проброс портов идёт) висящих в локалке на машине с IP 192.168.0.1 нереально ни из локалки ни из вне.
Из локалки понятно что можно напрямую по ip 192...., но по белому ip и доменному имени уже нет.
Отличий в iptable я не увидел.
IPTABLE на рабочей прошивке 34311:
DD-WRT v3.0-r34311 std (c) 2017 NewMedia-NET GmbH
Release: 12/29/17
BusyBox v1.27.2 (2017-12-29 02:39:11 CET) built-in shell (ash)
root@router:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:1723
ACCEPT udp -- anywhere anywhere udp spt:bootps dpt:bootpc
ACCEPT tcp -- anywhere anywhere tcp dpt:1723
ACCEPT gre -- anywhere anywhere
DROP udp -- anywhere anywhere udp dpt:route
DROP udp -- anywhere anywhere udp dpt:route
ACCEPT udp -- anywhere anywhere udp dpt:route
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
DROP icmp -- anywhere anywhere
DROP igmp -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere state NEW
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
DROP 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere
DROP 0 -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DROP 0 -- anywhere 192.168.0.0/16 state NEW
ACCEPT gre -- 192.168.0.0/16 anywhere
ACCEPT tcp -- 192.168.0.0/16 anywhere tcp dpt:1723
ACCEPT 0 -- anywhere anywhere
lan2wan 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere state RELATED,ESTAB
LISHED
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:smtp
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:domain
ACCEPT udp -- anywhere 192.168.0.1 udp dpt:domain
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:www
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:https
TRIGGER 0 -- anywhere anywhere TRIGGER type:in mat
ch:0 relate:0
trigger_out 0 -- anywhere anywhere
DROP 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere state NEW
DROP 0 -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
Chain advgrp_1 (28 references)
target prot opt source destination
DROP 0 -- anywhere anywhere ipp2p --edk
DROP 0 -- anywhere anywhere ipp2p --dc
DROP 0 -- anywhere anywhere ipp2p --gnu
DROP 0 -- anywhere anywhere ipp2p --kazaa
DROP 0 -- anywhere anywhere ipp2p --bit
DROP 0 -- anywhere anywhere ipp2p --apple
DROP 0 -- anywhere anywhere ipp2p --soul
DROP 0 -- anywhere anywhere ipp2p --winmx
DROP 0 -- anywhere anywhere ipp2p --ares
DROP 0 -- anywhere anywhere ipp2p --mute
DROP 0 -- anywhere anywhere ipp2p --waste
DROP 0 -- anywhere anywhere ipp2p --xdcc
DROP 0 -- anywhere anywhere length 0:550 LAYER7
l7proto bt
DROP tcp -- anywhere anywhere LAYER7 l7proto ares
DROP 0 -- anywhere anywhere LAYER7 l7proto bt4
DROP 0 -- anywhere anywhere LAYER7 l7proto bt1
DROP 0 -- anywhere anywhere LAYER7 l7proto bitt
orrent
DROP 0 -- anywhere anywhere LAYER7 l7proto bt2
DROP tcp -- anywhere anywhere LAYER7 l7proto gnut
ella
DROP 0 -- anywhere anywhere LAYER7 l7proto appl
ejuice
DROP tcp -- anywhere anywhere LAYER7 l7proto dire
ctconnect
DROP tcp -- anywhere anywhere LAYER7 l7proto soul
seek
DROP tcp -- anywhere anywhere LAYER7 l7proto open
ft
DROP 0 -- anywhere anywhere LAYER7 l7proto fast
track
DROP 0 -- anywhere anywhere LAYER7 l7proto imes
h
DROP 0 -- anywhere anywhere LAYER7 l7proto audi
ogalaxy
DROP tcp -- anywhere anywhere LAYER7 l7proto bear
share
DROP 0 -- anywhere anywhere LAYER7 l7proto edon
key
DROP 0 -- anywhere anywhere LAYER7 l7proto free
net
DROP 0 -- anywhere anywhere LAYER7 l7proto gnuc
leuslan
DROP 0 -- anywhere anywhere LAYER7 l7proto gobo
ogy
DROP 0 -- anywhere anywhere LAYER7 l7proto hotl
ine
DROP tcp -- anywhere anywhere LAYER7 l7proto mute
DROP tcp -- anywhere anywhere LAYER7 l7proto naps
ter
DROP tcp -- anywhere anywhere LAYER7 l7proto sori
bada
DROP 0 -- anywhere anywhere LAYER7 l7proto tesl
a
Chain advgrp_10 (0 references)
target prot opt source destination
Chain advgrp_2 (0 references)
target prot opt source destination
Chain advgrp_3 (0 references)
target prot opt source destination
Chain advgrp_4 (0 references)
target prot opt source destination
Chain advgrp_5 (0 references)
target prot opt source destination
Chain advgrp_6 (0 references)
target prot opt source destination
Chain advgrp_7 (0 references)
target prot opt source destination
Chain advgrp_8 (0 references)
target prot opt source destination
Chain advgrp_9 (0 references)
target prot opt source destination
Chain grp_1 (1 references)
target prot opt source destination
advgrp_1 0 -- 10.10.2.1 anywhere
advgrp_1 0 -- anywhere 10.10.2.1
advgrp_1 0 -- 10.10.2.2/31 anywhere
advgrp_1 0 -- anywhere 10.10.2.2/31
advgrp_1 0 -- 10.10.2.4/30 anywhere
advgrp_1 0 -- anywhere 10.10.2.4/30
advgrp_1 0 -- 10.10.2.8/29 anywhere
advgrp_1 0 -- anywhere 10.10.2.8/29
advgrp_1 0 -- 10.10.2.16/28 anywhere
advgrp_1 0 -- anywhere 10.10.2.16/28
advgrp_1 0 -- 10.10.2.32/27 anywhere
advgrp_1 0 -- anywhere 10.10.2.32/27
advgrp_1 0 -- 10.10.2.64/26 anywhere
advgrp_1 0 -- anywhere 10.10.2.64/26
advgrp_1 0 -- 10.10.2.128/26 anywhere
advgrp_1 0 -- anywhere 10.10.2.128/26
advgrp_1 0 -- 10.10.2.192/27 anywhere
advgrp_1 0 -- anywhere 10.10.2.192/27
advgrp_1 0 -- 10.10.2.224/28 anywhere
advgrp_1 0 -- anywhere 10.10.2.224/28
advgrp_1 0 -- 10.10.2.240/29 anywhere
advgrp_1 0 -- anywhere 10.10.2.240/29
advgrp_1 0 -- 10.10.2.248/30 anywhere
advgrp_1 0 -- anywhere 10.10.2.248/30
advgrp_1 0 -- 10.10.2.252/31 anywhere
advgrp_1 0 -- anywhere 10.10.2.252/31
advgrp_1 0 -- 10.10.2.254 anywhere
advgrp_1 0 -- anywhere 10.10.2.254
Chain grp_10 (0 references)
target prot opt source destination
Chain grp_2 (0 references)
target prot opt source destination
Chain grp_3 (0 references)
target prot opt source destination
Chain grp_4 (0 references)
target prot opt source destination
Chain grp_5 (0 references)
target prot opt source destination
Chain grp_6 (0 references)
target prot opt source destination
Chain grp_7 (0 references)
target prot opt source destination
Chain grp_8 (0 references)
target prot opt source destination
Chain grp_9 (0 references)
target prot opt source destination
Chain lan2wan (1 references)
target prot opt source destination
grp_1 0 -- anywhere anywhere
Chain logaccept (0 references)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere
Chain logdrop (0 references)
target prot opt source destination
DROP 0 -- anywhere anywhere
Chain logreject (0 references)
target prot opt source destination
REJECT tcp -- anywhere anywhere reject-with tcp-res
et
Chain trigger_out (1 references)
target prot opt source destination
root@router:~#
на 34411 и 34578 аналогичная проблема, IPTABLE:
BusyBox v1.28.0 (2018-01-19 03:11:30 CET) built-in shell (ash)
root@router:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:1723
ACCEPT udp -- anywhere anywhere udp spt:bootps dpt:bootpc
ACCEPT tcp -- anywhere anywhere tcp dpt:1723
ACCEPT gre -- anywhere anywhere
DROP udp -- anywhere anywhere udp dpt:route
DROP udp -- anywhere anywhere udp dpt:route
ACCEPT udp -- anywhere anywhere udp dpt:route
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
DROP icmp -- anywhere anywhere
DROP igmp -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere state NEW
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
DROP 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere
DROP 0 -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DROP 0 -- anywhere 192.168.0.0/16 state NEW
ACCEPT gre -- 192.168.0.0/16 anywhere
ACCEPT tcp -- 192.168.0.0/16 anywhere tcp dpt:1723
ACCEPT 0 -- anywhere anywhere
lan2wan 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:smtp
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:domain
ACCEPT udp -- anywhere 192.168.0.1 udp dpt:domain
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:www
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:https
TRIGGER 0 -- anywhere anywhere TRIGGER type:in match:0 relate:0
trigger_out 0 -- anywhere anywhere
DROP 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere state NEW
DROP 0 -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
Chain advgrp_1 (28 references)
target prot opt source destination
DROP 0 -- anywhere anywhere ipp2p --edk
DROP 0 -- anywhere anywhere ipp2p --dc
DROP 0 -- anywhere anywhere ipp2p --gnu
DROP 0 -- anywhere anywhere ipp2p --kazaa
DROP 0 -- anywhere anywhere ipp2p --bit
DROP 0 -- anywhere anywhere ipp2p --apple
DROP 0 -- anywhere anywhere ipp2p --soul
DROP 0 -- anywhere anywhere ipp2p --winmx
DROP 0 -- anywhere anywhere ipp2p --ares
DROP 0 -- anywhere anywhere ipp2p --mute
DROP 0 -- anywhere anywhere ipp2p --waste
DROP 0 -- anywhere anywhere ipp2p --xdcc
DROP 0 -- anywhere anywhere length 0:550 LAYER7 l7proto bt
DROP tcp -- anywhere anywhere LAYER7 l7proto ares
DROP 0 -- anywhere anywhere LAYER7 l7proto bt4
DROP 0 -- anywhere anywhere LAYER7 l7proto bt1
DROP 0 -- anywhere anywhere LAYER7 l7proto bittorrent
DROP 0 -- anywhere anywhere LAYER7 l7proto bt2
DROP tcp -- anywhere anywhere LAYER7 l7proto gnutella
DROP 0 -- anywhere anywhere LAYER7 l7proto applejuice
DROP tcp -- anywhere anywhere LAYER7 l7proto directconnect
DROP tcp -- anywhere anywhere LAYER7 l7proto soulseek
DROP tcp -- anywhere anywhere LAYER7 l7proto openft
DROP 0 -- anywhere anywhere LAYER7 l7proto fasttrack
DROP 0 -- anywhere anywhere LAYER7 l7proto imesh
DROP 0 -- anywhere anywhere LAYER7 l7proto audiogalaxy
DROP tcp -- anywhere anywhere LAYER7 l7proto bearshare
DROP 0 -- anywhere anywhere LAYER7 l7proto edonkey
DROP 0 -- anywhere anywhere LAYER7 l7proto freenet
DROP 0 -- anywhere anywhere LAYER7 l7proto gnucleuslan
DROP 0 -- anywhere anywhere LAYER7 l7proto goboogy
DROP 0 -- anywhere anywhere LAYER7 l7proto hotline
DROP tcp -- anywhere anywhere LAYER7 l7proto mute
DROP tcp -- anywhere anywhere LAYER7 l7proto napster
DROP tcp -- anywhere anywhere LAYER7 l7proto soribada
DROP 0 -- anywhere anywhere LAYER7 l7proto tesla
Chain advgrp_10 (0 references)
target prot opt source destination
Chain advgrp_2 (0 references)
target prot opt source destination
Chain advgrp_3 (0 references)
target prot opt source destination
Chain advgrp_4 (0 references)
target prot opt source destination
Chain advgrp_5 (0 references)
target prot opt source destination
Chain advgrp_6 (0 references)
target prot opt source destination
Chain advgrp_7 (0 references)
target prot opt source destination
Chain advgrp_8 (0 references)
target prot opt source destination
Chain advgrp_9 (0 references)
target prot opt source destination
Chain grp_1 (1 references)
target prot opt source destination
advgrp_1 0 -- 10.10.2.1 anywhere
advgrp_1 0 -- anywhere 10.10.2.1
advgrp_1 0 -- 10.10.2.2/31 anywhere
advgrp_1 0 -- anywhere 10.10.2.2/31
advgrp_1 0 -- 10.10.2.4/30 anywhere
advgrp_1 0 -- anywhere 10.10.2.4/30
advgrp_1 0 -- 10.10.2.8/29 anywhere
advgrp_1 0 -- anywhere 10.10.2.8/29
advgrp_1 0 -- 10.10.2.16/28 anywhere
advgrp_1 0 -- anywhere 10.10.2.16/28
advgrp_1 0 -- 10.10.2.32/27 anywhere
advgrp_1 0 -- anywhere 10.10.2.32/27
advgrp_1 0 -- 10.10.2.64/26 anywhere
advgrp_1 0 -- anywhere 10.10.2.64/26
advgrp_1 0 -- 10.10.2.128/26 anywhere
advgrp_1 0 -- anywhere 10.10.2.128/26
advgrp_1 0 -- 10.10.2.192/27 anywhere
advgrp_1 0 -- anywhere 10.10.2.192/27
advgrp_1 0 -- 10.10.2.224/28 anywhere
advgrp_1 0 -- anywhere 10.10.2.224/28
advgrp_1 0 -- 10.10.2.240/29 anywhere
advgrp_1 0 -- anywhere 10.10.2.240/29
advgrp_1 0 -- 10.10.2.248/30 anywhere
advgrp_1 0 -- anywhere 10.10.2.248/30
advgrp_1 0 -- 10.10.2.252/31 anywhere
advgrp_1 0 -- anywhere 10.10.2.252/31
advgrp_1 0 -- 10.10.2.254 anywhere
advgrp_1 0 -- anywhere 10.10.2.254
Chain grp_10 (0 references)
target prot opt source destination
Chain grp_2 (0 references)
target prot opt source destination
Chain grp_3 (0 references)
target prot opt source destination
Chain grp_4 (0 references)
target prot opt source destination
Chain grp_5 (0 references)
target prot opt source destination
Chain grp_6 (0 references)
target prot opt source destination
Chain grp_7 (0 references)
target prot opt source destination
Chain grp_8 (0 references)
target prot opt source destination
Chain grp_9 (0 references)
target prot opt source destination
Chain lan2wan (1 references)
target prot opt source destination
grp_1 0 -- anywhere anywhere
Chain logaccept (0 references)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere
Chain logdrop (0 references)
target prot opt source destination
DROP 0 -- anywhere anywhere
Chain logreject (0 references)
target prot opt source destination
REJECT tcp -- anywhere anywhere reject-with tcp-reset
Chain trigger_out (1 references)
target prot opt source destination
root@router:~#
Back to top
vasek00 DD-WRT Guru Joined: 06 Nov 2010 Posts: 3312
Posted: Wed Jan 24, 2018 10:30 Post subject: Re: FW r34411 bug with port forwarding
Quote: Достучаться до сервисов (по имени, где имя привязано к белому IP, а далее проброс портов идёт) висящих в локалке на машине с IP 192.168.0.1 нереально ни из локалки ни из вне.
Поконкретней что привязано к IP и какие в WEB делаете пробросы порта и смотрим в iptables.
Back to top
DMSs DD-WRT Novice Joined: 03 Jul 2016 Posts: 15 Location: Russia
Posted: Fri Jan 26, 2018 14:24 Post subject:
Белый IP port 80 -> 192.168.0.1:80 (сервер в ЛВС)
53, 25 -> 53, 25
Не важно какие порты если форвардинг не работает.
При обращении из интернета или локалки на белый IP на любой из портов форвардинг не работает.
Соответственно если браузером попытаться открыть www. имя.ru ничего не будет, так как имя ресолвится в этот самый белый IP, а форвардинга нет.
Соответственно обратиться к сервисам (www, dns, smtp) крутящимся на машине 192.168.0.1 по внешнему IP никак.
Из локалки понятно я могу сразу щимиться на 192.168.0.1 и нужный порт, это понятно что будет работать, так как в данном случае маршрутизатор в роли свича выступать будет для компов в сети.
Iptables как просилы выложил, на всех трёх прошивках идентично, вот только на прошивках с 2018г форвардинг всё равно не работает
Back to top
AlDemin DD-WRT User Joined: 20 Mar 2014 Posts: 139
Posted: Sun Feb 04, 2018 8:26 Post subject:
Что у вас с iptables FORWARD наворочено?
Первая строка рубит все попытки входящих подключений.
2-я с 3-й разрешает РРТР из сети наружу
4-я разрешает все!
5-я норм.- что то ограничивает для сети 10.10.2.0/24
6-я норм. но она по сути должна быть на первом месте.
7,8,9-я дублируют 4-ю
10-14 - ваш пробросы портов, но до них не доберется ни один пакет из за первой строки, а не будь первой, в 4-й,7-8-9-ых уже все разрешено.
15 и 16 - норм.
17 - дубль 1-й
18 - дубль 4-й
19 - норм.
по нормальному порядок строк должен быть такой:
6, 2, 3, 5, 10-16, 19
Но возможно я чего не вижу по спорным строкам 1,4,7-9,17 и 18 тк команду нужно давать так: iptables -vnL
ну и iptables -t nat -vnL тоже неплохо бы увидеть.
Back to top
Groma DD-WRT Novice Joined: 21 Jun 2016 Posts: 41
Posted: Sun Feb 04, 2018 20:19 Post subject:
Подтверждаю. dir825
На всех прошивках 2018 проблема с форвардингом портов.
При этом у меня всего два правила.
Но восстанавливает только последняя версия 2017.
версия 34311 рабочая.
Вот что написали в англоязычной ветке топика некто Kong.
"It is only broken for certain wan types. But BS just rolled back his firewall changes shortly before I was going to commit the proper fixes.
Man this sucks."
Как я понял - это связано с каким-то косяком в фаерволе. Который не дали пофиксеть и она дожил до r34777. Надеюсь в более новой это дело пофиксят.
Back to top
AlDemin DD-WRT User Joined: 20 Mar 2014 Posts: 139
Posted: Mon Feb 05, 2018 17:21 Post subject:
Дык ежу понятно, что косяк, но в чем косяк? Вы жалуетесь, а инфы не даете.
пож полный выхлоп команд:
ifconfig
route -n
iptables -t nat -vnL
iptables -vnL
Если web-конфигуратор, делает что то неправильно, то как вариант можно написать Firewall-скрипт.
Вы делали сброс к заводским и полную перенастройку или тяните за собой древнюю конфигурацию?
UPD: ради интереса прошивал свой tplink wr842v2 прошивками 34411 и 34777 прокидывал через него 22-й порт к компу, подключился извне без проблем на обоих прошивках.
Режим WAN - DHCP.
UPD2: прошил tplink wr1043v1 билдом 34777 - проброс работает. WAN - PPPoE
Back to top
DMSs DD-WRT Novice Joined: 03 Jul 2016 Posts: 15 Location: Russia
Posted: Thu Feb 08, 2018 7:06 Post subject:
AlDemin wrote: Что у вас с iptables FORWARD наворочено?
Первая строка рубит все попытки входящих подключений.
2-я с 3-й разрешает РРТР из сети наружу
4-я разрешает все!
5-я норм.- что то ограничивает для сети 10.10.2.0/24
6-я норм. но она по сути должна быть на первом месте.
7,8,9-я дублируют 4-ю
10-14 - ваш пробросы портов, но до них не доберется ни один пакет из за первой строки, а не будь первой, в 4-й,7-8-9-ых уже все разрешено.
15 и 16 - норм.
17 - дубль 1-й
18 - дубль 4-й
19 - норм.
по нормальному порядок строк должен быть такой:
6, 2, 3, 5, 10-16, 19
Но возможно я чего не вижу по спорным строкам 1,4,7-9,17 и 18 тк команду нужно давать так: iptables -vnL
ну и iptables -t nat -vnL тоже неплохо бы увидеть.
Я руками ничего не настраивал, залита прошивка и сделаны пробросы портов. В ручной настройке не силён, поэтому что там и в каком порядке прописывает прошивка вопрос больше к разработчикам, а не ко мне.
Back to top
DMSs DD-WRT Novice Joined: 03 Jul 2016 Posts: 15 Location: Russia
Posted: Thu Feb 08, 2018 7:11 Post subject:
AlDemin wrote:
Если web-конфигуратор, делает что то неправильно, то как вариант можно написать Firewall-скрипт.
Вы делали сброс к заводским и полную перенастройку или тяните за собой древнюю конфигурацию?
как вариант написать, но я в этом ноль.
к заводским не сбрасывал, изначально влита (со стоковой на ddwrt) прошивка от 17-го года, какая версия уже не вспомню.
Но судя по тому что проблема не только у меня, да и неважно когда она вылезла, это проблема разработчика.
Для этого и должны собирать инфу, чтобы свои ошибки исправлять.
Back to top
DMSs DD-WRT Novice Joined: 03 Jul 2016 Posts: 15 Location: Russia
Posted: Thu Feb 08, 2018 12:11 Post subject:
AlDemin wrote: Вы делали сброс к заводским и полную перенастройку или тяните за собой древнюю конфигурацию?
сделал полный сброс. залил последнюю прошивку 2018г. со сбросом. дополнительно ещё раз сбросил ))) сделал проброс портов по новой через web.
ничего не поменялось, как не работало так и не работает.
выводы:
1. web интерфейс криво прописывает iptables, вывод сделан на основе слов AlDemin .
2. на прошивках 2018г не работает проброс портов, со слов Groma из-за кривого фаервола.
итого, и внутри криво (фаервол) и снаружи (вэб-интерфейс).
пора уходить с этой прошивки на что-то более "прямое".
Back to top
DMSs DD-WRT Novice Joined: 03 Jul 2016 Posts: 15 Location: Russia
Posted: Thu Feb 08, 2018 12:31 Post subject:
AlDemin wrote: Что у вас с iptables FORWARD наворочено?
что ddwrt воротит через web-интерфейс, то и наворочено.
после сброса, прошивки новой версии и опять откат на последнюю 2017г.:
Code:
# iptables -t nat -vnL
Chain PREROUTING (policy ACCEPT 4729 packets, 446K bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT icmp -- * * 0.0.0.0/0 белый_IP to:192.168.0.254
427 22300 DNAT tcp -- * * 0.0.0.0/0 белый_IP tcp dpt:25 to:192.168.0.1:25
0 0 DNAT tcp -- * * 0.0.0.0/0 белый_IP tcp dpt:53 to:192.168.0.1:53
27 1757 DNAT udp -- * * 0.0.0.0/0 белый_IP udp dpt:53 to:192.168.0.1:53
4 184 DNAT tcp -- * * 0.0.0.0/0 белый_IP tcp dpt:80 to:192.168.0.1:80
38 2056 DNAT tcp -- * * 0.0.0.0/0 белый_IP tcp dpt:443 to:192.168.0.1:443
36 1872 DNAT tcp -- * * 0.0.0.0/0 белый_IP tcp dpt:3389 to:192.168.0.164:3389
238 32132 TRIGGER 0 -- * * 0.0.0.0/0 белый_IP TRIGGER type:dnat match:0 relate:0
Chain INPUT (policy ACCEPT 874 packets, 61383 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 457 packets, 31611 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 961 packets, 58332 bytes)
pkts bytes target prot opt in out source destination
1511 90949 SNAT 0 -- * eth1 192.168.0.0/16 0.0.0.0/0 to:белый_IP
28 1456 MASQUERADE 0 -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x80000000/0x80000000
43 2633 SNAT 0 -- * eth1 10.10.2.0/24 0.0.0.0/0 to:белый_IP
*
Code:
# iptables -vnL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
2928 358K ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- eth1 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1723
2 656 ACCEPT udp -- eth1 * 0.0.0.0/0 0.0.0.0/0 udp spt:67 dpt:68
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1723
0 0 ACCEPT 47 -- * * 0.0.0.0/0 0.0.0.0/0
0 0 DROP udp -- eth1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 DROP udp -- br0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
1312 102K ACCEPT 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
42 3875 ACCEPT 0 -- br2 * 0.0.0.0/0 0.0.0.0/0
0 0 DROP icmp -- eth1 * 0.0.0.0/0 0.0.0.0/0
20 640 DROP 2 -- * * 0.0.0.0/0 0.0.0.0/0
27 1896 ACCEPT 0 -- lo * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 ACCEPT 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 ACCEPT udp -- br2 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
0 0 ACCEPT udp -- br2 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53
0 0 ACCEPT tcp -- br2 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
0 0 DROP 0 -- br2 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 ACCEPT 0 -- br2 * 0.0.0.0/0 0.0.0.0/0
945 125K DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
586K 77M ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 DROP 0 -- br2 * 0.0.0.0/0 192.168.0.0/16 state NEW
0 0 ACCEPT 47 -- * eth1 192.168.0.0/16 0.0.0.0/0
0 0 ACCEPT tcp -- * eth1 192.168.0.0/16 0.0.0.0/0 tcp dpt:1723
68 3977 ACCEPT 0 -- br2 * 0.0.0.0/0 0.0.0.0/0
3592 219K lan2wan 0 -- * * 0.0.0.0/0 0.0.0.0/0
31 1612 ACCEPT 0 -- br0 br0 0.0.0.0/0 0.0.0.0/0
3026 189K ACCEPT 0 -- br0 eth1 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- br2 eth1 0.0.0.0/0 0.0.0.0/0
435 22748 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.1 tcp dpt:25
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.1 tcp dpt:53
28 1823 ACCEPT udp -- * * 0.0.0.0/0 192.168.0.1 udp dpt:53
4 192 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.1 tcp dpt:80
14 800 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.1 tcp dpt:443
46 2392 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.164 tcp dpt:3389
0 0 TRIGGER 0 -- eth1 br0 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
8 480 trigger_out 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
8 480 DROP 0 -- br0 br2 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 ACCEPT 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 224 packets, 17749 bytes)
pkts bytes target prot opt in out source destination
3453 1835K ACCEPT 0 -- * br0 0.0.0.0/0 0.0.0.0/0
47 17605 ACCEPT 0 -- * br2 0.0.0.0/0 0.0.0.0/0
Chain advgrp_1 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_10 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_2 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_3 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_4 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_5 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_6 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_7 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_8 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_9 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_1 (1 references)
pkts bytes target prot opt in out source destination
Chain grp_10 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_2 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_3 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_4 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_5 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_6 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_7 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_8 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_9 (0 references)
pkts bytes target prot opt in out source destination
Chain lan2wan (1 references)
pkts bytes target prot opt in out source destination
3592 219K grp_1 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logaccept (0 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logdrop (0 references)
pkts bytes target prot opt in out source destination
0 0 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logreject (0 references)
pkts bytes target prot opt in out source destination
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset
Chain trigger_out (1 references)
pkts bytes target prot opt in out source destination
*
Code: # iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:1723
ACCEPT udp -- anywhere anywhere udp spt:bootps dpt:bootpc
ACCEPT tcp -- anywhere anywhere tcp dpt:1723
ACCEPT gre -- anywhere anywhere
DROP udp -- anywhere anywhere udp dpt:route
DROP udp -- anywhere anywhere udp dpt:route
ACCEPT udp -- anywhere anywhere udp dpt:route
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
DROP icmp -- anywhere anywhere
DROP igmp -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere state NEW
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
DROP 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere
DROP 0 -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED
DROP 0 -- anywhere 192.168.0.0/16 state NEW
ACCEPT gre -- 192.168.0.0/16 anywhere
ACCEPT tcp -- 192.168.0.0/16 anywhere tcp dpt:1723
ACCEPT 0 -- anywhere anywhere
lan2wan 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:smtp
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:domain
ACCEPT udp -- anywhere 192.168.0.1 udp dpt:domain
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:www
ACCEPT tcp -- anywhere 192.168.0.1 tcp dpt:https
ACCEPT tcp -- anywhere 192.168.0.164 tcp dpt:3389
TRIGGER 0 -- anywhere anywhere TRIGGER type:in match:0 relate:0
trigger_out 0 -- anywhere anywhere
DROP 0 -- anywhere anywhere state NEW
ACCEPT 0 -- anywhere anywhere state NEW
DROP 0 -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere
ACCEPT 0 -- anywhere anywhere
Chain advgrp_1 (0 references)
target prot opt source destination
Chain advgrp_10 (0 references)
target prot opt source destination
Chain advgrp_2 (0 references)
target prot opt source destination
Chain advgrp_3 (0 references)
target prot opt source destination
Chain advgrp_4 (0 references)
target prot opt source destination
Chain advgrp_5 (0 references)
target prot opt source destination
Chain advgrp_6 (0 references)
target prot opt source destination
Chain advgrp_7 (0 references)
target prot opt source destination
Chain advgrp_8 (0 references)
target prot opt source destination
Chain advgrp_9 (0 references)
target prot opt source destination
Chain grp_1 (1 references)
target prot opt source destination
Chain grp_10 (0 references)
target prot opt source destination
Chain grp_2 (0 references)
target prot opt source destination
Chain grp_3 (0 references)
target prot opt source destination
Chain grp_4 (0 references)
target prot opt source destination
Chain grp_5 (0 references)
target prot opt source destination
Chain grp_6 (0 references)
target prot opt source destination
Chain grp_7 (0 references)
target prot opt source destination
Chain grp_8 (0 references)
target prot opt source destination
Chain grp_9 (0 references)
target prot opt source destination
Chain lan2wan (1 references)
target prot opt source destination
grp_1 0 -- anywhere anywhere
Chain logaccept (0 references)
target prot opt source destination
ACCEPT 0 -- anywhere anywhere
Chain logdrop (0 references)
target prot opt source destination
DROP 0 -- anywhere anywhere
Chain logreject (0 references)
target prot opt source destination
REJECT tcp -- anywhere anywhere reject-with tcp-reset
Chain trigger_out (1 references)
target prot opt source destination
*
Code: ~# ifconfig
ath0 Link encap:Ethernet HWaddr MAC_адрес
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:281681 errors:0 dropped:0 overruns:0 frame:0
TX packets:299752 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:29180500 (27.8 MiB) TX bytes:57645779 (54.9 MiB)
ath0.1 Link encap:Ethernet HWaddr MAC_адрес
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:933 errors:0 dropped:0 overruns:0 frame:0
TX packets:2124 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:146888 (143.4 KiB) TX bytes:389966 (380.8 KiB)
br0 Link encap:Ethernet HWaddr MAC_адрес
inet addr:192.168.0.254 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:312361 errors:0 dropped:401 overruns:0 frame:0
TX packets:322192 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:30078619 (28.6 MiB) TX bytes:61566689 (58.7 MiB)
br0:0 Link encap:Ethernet HWaddr MAC_адрес
inet addr:169.254.255.1 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
br2 Link encap:Ethernet HWaddr MAC_адрес
inet addr:10.10.2.254 Bcast:10.10.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:920 errors:0 dropped:17 overruns:0 frame:0
TX packets:716 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:132385 (129.2 KiB) TX bytes:289782 (282.9 KiB)
eth0 Link encap:Ethernet HWaddr MAC_адрес
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31297 errors:0 dropped:0 overruns:0 frame:0
TX packets:27757 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5368609 (5.1 MiB) TX bytes:12248579 (11.6 MiB)
Interrupt:4
eth0.2 Link encap:Ethernet HWaddr MAC_адрес
UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1484 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:80747 (78.8 KiB)
eth1 Link encap:Ethernet HWaddr MAC_адрес
inet addr:Белый_IP Bcast:x.x.x.x Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:349054 errors:0 dropped:8352 overruns:0 frame:0
TX packets:304951 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61905233 (59.0 MiB) TX bytes:33195246 (31.6 MiB)
Interrupt:5
imq0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:317188 errors:0 dropped:0 overruns:0 frame:0
TX packets:317188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:30
RX bytes:54857704 (52.3 MiB) TX bytes:54857704 (52.3 MiB)
imq1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16000 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:11000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:65536 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3944 (3.8 KiB) TX bytes:3944 (3.8 KiB)
*
Code: # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 x.x.x.x 0.0.0.0 UG 0 0 0 eth1
10.10.2.0 0.0.0.0 255.255.255.0 U 0 0 0 br2
БЕЛЫЙ_IP 0.0.0.0 255.255.255.224 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br0
Back to top
AlDemin DD-WRT User Joined: 20 Mar 2014 Posts: 139
Posted: Thu Feb 08, 2018 17:56 Post subject:
DMSs wrote:
Для этого и должны собирать инфу, чтобы свои ошибки исправлять.
Вы думаете они читают русскую ветку?
DMSs wrote:
выводы:
1. web интерфейс криво прописывает iptables, вывод сделан на основе слов AlDemin .
Это только предположение.
В этом выхлопе вижу, что что все правила прописаны корректно в нужном порядке, мало того, счетчики пакетов показывают, что пакеты извне проходят внутрь и через PREROUTING и через FORWARD. Или это выхлоп рабочей прошивки?
Где выхлоп нерабочей, чтоб понять проблему?
ifconfig
route -n
iptanles -t nat vnL
iptables -vnL FORWARD
Back to top
Groma DD-WRT Novice Joined: 21 Jun 2016 Posts: 41
Posted: Fri Feb 09, 2018 1:07 Post subject:
DD-WRT v3.0-r34876M std (02/08/1
Форвардинг заработал.
NTP сломался.
Back to top