1

Temat: Wolny transfer przez przekierowany port

Witam,
Mam bardzo dziwny problem po przesiadce na nowy router (linksys EA8500 + wlasny skompilowany najnowszy openwrt 18.06.2 snapshot), mianowicie... przekierowany port na NASa w sieci działa baaaardzo wolno lub w ogóle nie odpowiada, jak wchodzę wewnątrz sieci przez adres lokalny czyli 192.168.1.x to ładuje od razu, jak tylko próbuje wejść przez domene/lub IP zew to już jest problem, co ciekawe na tego samego NASa mam też inne porty i działają poprawnie! neutral jak można w ogóle to zdiagnozować?

przekierowanie tego portu wygląda tak (inne porty które działają poprawnie tak samo analogicznie wyglądaja):

config redirect
        option enabled '1'
        option target 'DNAT'
        option src 'wan'
        option dest 'lan'
        option proto 'tcp udp'
        option dest_ip '192.168.1.x'
        option name 'NAS'
        option src_ip 'xx.xxx.x.xx'
        option src_dport '8089'
        option dest_port '443'

z góry dziękuję na naprowadzenie na rozwiązanie wink

2

Odp: Wolny transfer przez przekierowany port

Może problem masz z tym 443? Np. próbuje zrobić redirect na jakiś port lub sprawdzić certyfikaty czy coś takiego.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3 (edytowany przez ryrzy 2019-05-28 11:37:52)

Odp: Wolny transfer przez przekierowany port

nawet jakby to dlaczego to działało wcześniej smile i co jakiś czas udaje się wbić na stronę logowania i czasem nie, gdzie inne przekierowania działają non stop (też są ssl z certyfikatem) big_smile hah taka zagadka...
spróbuje zmienić ten port 443 na NASie na inny. zobaczymy jak sie to bedzie zachowywac.


edit

zmienione na testowo na 433, chwile znów załapało i po kilku minutach już lipa neutral

4

Odp: Wolny transfer przez przekierowany port

To teraz zrób sobie iptables -v -L , zobacz liczniki przy regułce i uruchom przeglądarkę z tym adresem. Jak licznik się zwiększa to przekierowanie jak przekierowanie, działa nadal.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

5 (edytowany przez ryrzy 2019-06-11 07:39:43)

Odp: Wolny transfer przez przekierowany port

coś jest nie tak... w iptables nie widzę większości przekierowań, w sumie to tylko jeden port widze ... neutral tylko jedno mi sie pokazuje, nawet iptables -s nie pokazuje ich neutral a przy 2 mam takie błędy (chyba to błędy):

--ctstate INVALID -m comment --comment "!fw3: Prevent NAT leakage" -j DROP

EDIT

do tej pory nie rozwiązałem problemu... jak ktoś bedzie miał na to pomysł to prosze śmiało pisac tongue

6

Odp: Wolny transfer przez przekierowany port

chciałbym odkopać posta, przepraszam za post pod postem smile
od pol roku problem występuje nadal sad w miedzy czasie zmieniłem openwrt na wersje 19.07 oraz sprzęt na który jest przekierowany port, ale jest to nadal Openmediavault. sytuacja dla przypomnienia:

- przekierowane porty WAN-> LAN 192.168.1.xx

połączenie wewnątrz sieci:
- IP/Domena WAN:port -> LAN 192.168.1.xx:port - baaaaaaardzo wolno, czasem w ogole
- IP:port w LANie - połączenie normalne

połączenie z zewnątrz:
jw czyli - IP/Domena WAN:port -> LAN 192.168.1.xx:port - baaaaaaardzo wolno, czasem w ogóle

czy to port http czy https nie ma znaczenia (wykluczam certyfikaty/ssl)... jak można by to zdiagnozować po ludzku bo nie mam na to już pomysłu, a problemem jest ewidentnie coś na routerze sad

7

Odp: Wolny transfer przez przekierowany port

pokaż uci show firewall

ASUS TUF AX 6000 <-> QNAP TS-473A <->Pihole<->

8

Odp: Wolny transfer przez przekierowany port

bulgar71 napisał/a:

pokaż uci show firewall

firewall.@rule[0]=rule
firewall.@rule[0].name='Allow-DHCP-Renew'
firewall.@rule[0].src='wan'
firewall.@rule[0].proto='udp'
firewall.@rule[0].dest_port='68'
firewall.@rule[0].target='ACCEPT'
firewall.@rule[0].family='ipv4'
firewall.@rule[1]=rule
firewall.@rule[1].name='Allow-Ping'
firewall.@rule[1].src='wan'
firewall.@rule[1].proto='icmp'
firewall.@rule[1].icmp_type='echo-request'
firewall.@rule[1].family='ipv4'
firewall.@rule[1].target='ACCEPT'
firewall.@rule[2]=rule
firewall.@rule[2].name='Allow-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].src_ip='fc00::/6'
firewall.@rule[3].dest_ip='fc00::/6'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type' 'router-solicitation' 'neighbour-solicitation' 'router-advertisement' 'neighbour-advertisement'
firewall.@rule[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@rule[9]=rule
firewall.@rule[9].target='ACCEPT'
firewall.@rule[9].name='telefon-router'
firewall.@rule[9].src_mac='A8:xx:xx:xx:xx:xx'
firewall.@rule[9].src='guest'
firewall.@rule[9].proto='tcp udp'
firewall.@rule[9].family='ipv4'
firewall.@rule[10]=rule
firewall.@rule[10].src='guest'
firewall.@rule[10].proto='udp'
firewall.@rule[10].src_port='67-68'
firewall.@rule[10].dest_port='67-68'
firewall.@rule[10].target='ACCEPT'
firewall.@rule[10].family='ipv4'
firewall.@rule[11]=rule
firewall.@rule[11].src='guest'
firewall.@rule[11].dest_port='53'
firewall.@rule[11].target='ACCEPT'
firewall.@rule[11].family='ipv4'
firewall.@rule[11].proto='tcpudp'
firewall.@rule[12]=rule
firewall.@rule[12].src='wan'
firewall.@rule[12].target='ACCEPT'
firewall.@rule[12].proto='tcp'
firewall.@rule[12].dest_port='9xxx'
firewall.@rule[12].src_ip='xx.xx.0.xx'
firewall.@rule[12].name='xyz3'
firewall.@rule[13]=rule
firewall.@rule[13].name='OpenVPN'
firewall.@rule[13].target='ACCEPT'
firewall.@rule[13].src='wan'
firewall.@rule[13].proto='udp'
firewall.@rule[13].dest_port='1194'
firewall.@defaults[0]=defaults
firewall.@defaults[0].syn_flood='1'
firewall.@defaults[0].input='ACCEPT'
firewall.@defaults[0].output='ACCEPT'
firewall.@defaults[0].forward='REJECT'
firewall.@defaults[0].flow_offloading='1'
firewall.@zone[0]=zone
firewall.@zone[0].name='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[0].network='lan'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].input='REJECT'
firewall.@zone[1].output='ACCEPT'
firewall.@zone[1].forward='REJECT'
firewall.@zone[1].masq='1'
firewall.@zone[1].mtu_fix='1'
firewall.@zone[1].network='wan wan6'
firewall.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'
firewall.@redirect[0]=redirect
firewall.@redirect[0].target='DNAT'
firewall.@redirect[0].src='wan'
firewall.@redirect[0].dest='lan'
firewall.@redirect[0].proto='tcp udp'
firewall.@redirect[0].src_ip='xx.xx.0.xx'
firewall.@redirect[0].name='NAS'
firewall.@redirect[0].src_dport='8xxx'
firewall.@redirect[0].dest_ip='192.168.1.xx'
firewall.@redirect[0].dest_port='443'
firewall.@redirect[1]=redirect
firewall.@redirect[1].target='DNAT'
firewall.@redirect[1].src='wan'
firewall.@redirect[1].dest='lan'
firewall.@redirect[1].proto='tcp udp'
firewall.@redirect[1].src_dport='3232'
firewall.@redirect[1].dest_port='22'
firewall.@redirect[1].name='serwer ssh'
firewall.@redirect[1].src_ip='xx.xx.0.xx'
firewall.@redirect[1].dest_ip='192.168.1.x'
firewall.@redirect[2]=redirect
firewall.@redirect[2].target='DNAT'
firewall.@redirect[2].src='wan'
firewall.@redirect[2].dest='lan'
firewall.@redirect[2].proto='tcp udp'
firewall.@redirect[2].src_dport='8xxx'
firewall.@redirect[2].dest_port='8xxx'
firewall.@redirect[2].name='xyz'
firewall.@redirect[2].src_ip='xx.xx.0.xx'
firewall.@redirect[2].dest_ip='192.168.1.x'
firewall.@zone[2]=zone
firewall.@zone[2].name='guest'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].input='REJECT'
firewall.@zone[2].forward='REJECT'
firewall.@zone[2].network='guest'
firewall.@redirect[3]=redirect
firewall.@redirect[3].target='DNAT'
firewall.@redirect[3].src='wan'
firewall.@redirect[3].dest='lan'
firewall.@redirect[3].proto='tcp udp'
firewall.@redirect[3].src_dport='8xxx'
firewall.@redirect[3].dest_ip='192.168.1.x'
firewall.@redirect[3].dest_port='8xxx'
firewall.@redirect[3].name='x3x3x'
firewall.@redirect[3].src_ip='xx.xx.0.xx'
firewall.@redirect[3].enabled='0'
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].dest='wan'
firewall.@forwarding[0].src='guest'
firewall.@zone[3]=zone
firewall.@zone[3].name='vpn'
firewall.@zone[3].input='ACCEPT'
firewall.@zone[3].forward='ACCEPT'
firewall.@zone[3].output='ACCEPT'
firewall.@zone[3].network='vpn'
firewall.@zone[3].masq='1'
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src='vpn'
firewall.@forwarding[1].dest='wan'
firewall.@redirect[4]=redirect
firewall.@redirect[4].target='DNAT'
firewall.@redirect[4].src='wan'
firewall.@redirect[4].dest='lan'
firewall.@redirect[4].proto='tcp udp'
firewall.@redirect[4].dest_ip='192.168.1.x'
firewall.@redirect[4].name='NxS'
firewall.@redirect[4].src_ip='xx.xx.0.xx'
firewall.@redirect[4].src_dport='8xxx'
firewall.@redirect[4].dest_port='443'
firewall.@forwarding[2]=forwarding
firewall.@forwarding[2].dest='guest'
firewall.@forwarding[2].src='lan'
firewall.@forwarding[3]=forwarding
firewall.@forwarding[3].dest='wan'
firewall.@forwarding[3].src='lan'
firewall.@forwarding[4]=forwarding
firewall.@forwarding[4].dest='lan'
firewall.@forwarding[4].src='vpn'
firewall.miniupnpd=include
firewall.miniupnpd.type='script'
firewall.miniupnpd.path='/usr/share/miniupnpd/firewall.include'
firewall.miniupnpd.family='any'
firewall.miniupnpd.reload='1'
firewall.@rule[14]=rule
firewall.@rule[14].dest_port='443'
firewall.@rule[14].src='wan'
firewall.@rule[14].name='test'
firewall.@rule[14].dest='lan'
firewall.@rule[14].dest_ip='192.168.1.xx'
firewall.@rule[14].target='ACCEPT'
firewall.@rule[14].proto='tcp udp'
firewall.@rule[14].enabled='0'
firewall.@redirect[5]=redirect
firewall.@redirect[5].name='testowy'
firewall.@redirect[5].src='wan'
firewall.@redirect[5].proto='tcpudp'
firewall.@redirect[5].src_ip='xx.xx.0.xx'
firewall.@redirect[5].src_dport='8xxx'
firewall.@redirect[5].dest_port='8xxx'
firewall.@redirect[5].dest_ip='192.168.1.xx'
firewall.@redirect[5].dest='lan'
root@OpenWrt:~#

9

Odp: Wolny transfer przez przekierowany port

Ciekawostka:
szukając rozwiązania po raz N-ty, znalazłem to: https://forum.openwrt.org/t/port-forwar … ound/37740
autor sugeruje, że problem występuje jeśli używamy innego portu zewnętrznego niż wewnętrzny i faktycznie... tak właśnie jest.
Jeśli port zew jest inny niż wew to dzieją się cuda, jeśli jednak oba porty są jednakowe to wszystko działa płynnie i bez zająknięcia roll

może to kogoś kto ma większą wiedze naprowadzi czego moze byc to przyczyna smile w sumie mozna pozmieniac porty tu i tu na te same ale czasem jest to problematyczne (zmiana wew portu), nie każde urządzenie/usługa na to pozwoli.