1

Temat: jak udostępnić LuCI dla WAN?

Witam,
Po zmianie routera przyszedł czas na konfigurację nowego OpenWRT CC.

Tak jak wcześniej i tym razem chciałem udostępnić sobie GUI przez WAN.
wpisałem sobie standardową regułę do firewalla:

config rule
       option name 'gui'
       option src 'wan'
       option target 'ACCEPT'
       option proto 'tcp'
       option dest_port '80'

na razie akceptuję cały ruch, ale później zezwolę tylko na jedno IP.

sprawdziłem sobie, że port 80 po tym zabiegu jest otwarty. ustawiłem sobie ddnsa, host odpowiada na pingi.
mimo to nie mogę przez przeglądarkę połączyć się z zewnątrz z LuCI. połączenie zmienia mi się z http:// na https:// (czyli żądanie do routera dociera, bo to router decyduje o tym, czy połączenie ma być szyfrowane czy nie). Ale w odpowiedzi dostaję komunikat:

"Strona internetowa jest niedostępna
ERR_CONNECTION_REFUSED"

LuCi z LANu jest oczywiście dostępne.

SSH z WANu równiez działa (ta sama reguła w firewallu co dla GUI, tylko inny port)

ktoś ma pomysł o czym zapomniałem?

2

Odp: jak udostępnić LuCI dla WAN?

Czy otwórz również port 443. LuCI domyślnie przerzuca na https chyba że jawnie mu powiesz żeby tego nie robił.

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

3

Odp: jak udostępnić LuCI dla WAN?

siutek napisał/a:

ktoś ma pomysł o czym zapomniałem?

http -> port 80.
https -> port 443.

4

Odp: jak udostępnić LuCI dla WAN?

jako kolejna blizniacza reguła?? czy dopisać to do istniejącej reguły GUI?? (jeśli tak to jak?)

5

Odp: jak udostępnić LuCI dla WAN?

Kolejna otwierająca 443.

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

6

Odp: jak udostępnić LuCI dla WAN?

dzięki! działa smile

7

Odp: jak udostępnić LuCI dla WAN?

by nie śmiecić pociągnę ten wątek, bo problem bardzo zblizony.

uruchomilem sobie transmission, w sieci lokalnej panel webowy śmiga, natomiast na zewnątrz nie chce.

w firewallu dodałem regułę

config rule
   option name "transmission_wan'
   option src 'wan'
   option target 'ACCEPT'
   option proto 'tcp'
   option dest_port '9091'

zrestowałem firewalla, w LuCI > transmission wyłączyłem RPC. mimo to nadal nie mogę się dobić z zewnątrz.
przeglądarka wyświetla komunikat:

"Strona internetowa jest niedostępna

ERR_CONNECTION_REFUSED"

co tym razem???

myslalem, że wystarczy udostępnić port i wszystko będzie śmigało.

8

Odp: jak udostępnić LuCI dla WAN?

Włącz to rpc, nie dotykaj tych opcji. transmission-web jeszcze potrzebujesz.

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

9

Odp: jak udostępnić LuCI dla WAN?

RPC włączone.

transmission web mam zainstalowane. z LANu bez problemu mogę wyświetlić panel webowy transmission. z WANu już nie.

10

Odp: jak udostępnić LuCI dla WAN?

pokaż
uci show transmission
uci show firewall

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

11

Odp: jak udostępnić LuCI dla WAN?

uci show transmission:

transmission.@transmission[0]=transmission
transmission.@transmission[0].config_dir='/tmp/transmission'
transmission.@transmission[0].alt_speed_enabled='false'
transmission.@transmission[0].bind_address_ipv4='0.0.0.0'
transmission.@transmission[0].bind_address_ipv6='::'
transmission.@transmission[0].blocklist_enabled='false'
transmission.@transmission[0].cache_size_mb='2'
transmission.@transmission[0].dht_enabled='true'
transmission.@transmission[0].download_queue_enabled='true'
transmission.@transmission[0].download_queue_size='4'
transmission.@transmission[0].encryption='1'
transmission.@transmission[0].idle_seeding_limit_enabled='false'
transmission.@transmission[0].incomplete_dir_enabled='false'
transmission.@transmission[0].lazy_bitfield_enabled='true'
transmission.@transmission[0].lpd_enabled='false'
transmission.@transmission[0].message_level='1'
transmission.@transmission[0].peer_limit_global='240'
transmission.@transmission[0].peer_limit_per_torrent='60'
transmission.@transmission[0].peer_port='51413'
transmission.@transmission[0].peer_port_random_on_start='false'
transmission.@transmission[0].peer_socket_tos='default'
transmission.@transmission[0].pex_enabled='true'
transmission.@transmission[0].port_forwarding_enabled='true'
transmission.@transmission[0].preallocation='1'
transmission.@transmission[0].queue_stalled_enabled='true'
transmission.@transmission[0].queue_stalled_minutes='30'
transmission.@transmission[0].ratio_limit_enabled='false'
transmission.@transmission[0].scrape_paused_torrents_enabled='true'
transmission.@transmission[0].script_torrent_done_enabled='false'
transmission.@transmission[0].seed_queue_enabled='false'
transmission.@transmission[0].speed_limit_down_enabled='false'
transmission.@transmission[0].speed_limit_up_enabled='false'
transmission.@transmission[0].start_added_torrents='true'
transmission.@transmission[0].trash_original_torrent_files='false'
transmission.@transmission[0].umask='18'
transmission.@transmission[0].upload_slots_per_torrent='14'
transmission.@transmission[0].utp_enabled='true'
transmission.@transmission[0].scrape_paused_torrents='true'
transmission.@transmission[0].watch_dir_enabled='false'
transmission.@transmission[0].enabled='1'
transmission.@transmission[0].user='root'
transmission.@transmission[0].download_dir='/mnt/sda1/torrenty'
transmission.@transmission[0].rename_partial_files='false'
transmission.@transmission[0].rpc_enabled='true'
transmission.@transmission[0].rpc_whitelist_enabled='false'
transmission.@transmission[0].rpc_authentication_required='false'



usi show firewall:

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.@zone[0]=zone
firewall.@zone[0].name='lan'
firewall.@zone[0].network='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].network='wan' 'wan6'
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.@forwarding[0]=forwarding
firewall.@forwarding[0].src='lan'
firewall.@forwarding[0].dest='wan'
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='fe80::/10'
firewall.@rule[3].src_port='547'
firewall.@rule[3].dest_ip='fe80::/10'
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.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'
firewall.@rule[7]=rule
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].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].name='ssh'
firewall.@rule[9].src='wan'
firewall.@rule[9].target='ACCEPT'
firewall.@rule[9].proto='tcp'
firewall.@rule[9].dest_port='22'
firewall.@rule[10]=rule
firewall.@rule[10].name='gui'
firewall.@rule[10].src='wan'
firewall.@rule[10].target='ACCEPT'
firewall.@rule[10].proto='tcp'
firewall.@rule[10].dest_port='80'
firewall.@rule[11]=rule
firewall.@rule[11].name='gui_2'
firewall.@rule[11].src='wan'
firewall.@rule[11].target='ACCEPT'
firewall.@rule[11].proto='tcp'
firewall.@rule[11].dest_port='443'
firewall.@rule[12]=rule
firewall.@rule[12].name='ftp'
firewall.@rule[12].src='wan'
firewall.@rule[12].target='ACCEPT'
firewall.@rule[12].proto='tcp'
firewall.@rule[12].dest_port='21'
firewall.@rule[13]=rule
firewall.@rule[13].name='transmission_wan'
firewall.@rule[13].src='wan'
firewall.@rule[13].target='ACCEPT'
firewall.@rule[13].proto='tcp'
firewall.@rule[13].dest_port='9091'

12

Odp: jak udostępnić LuCI dla WAN?

brakuje w konfigu

    option rpc_bind_address '0.0.0.0'
    option rpc_enabled true
    option rpc_password ''
    option rpc_port 9091
    option rpc_url '/transmission/'
    option rpc_username ''
    option rpc_whitelist '127.0.0.1,192.168.1.*'
    option rpc_whitelist_enabled false

Mówiłem, nie dotykaj rpc.

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

13

Odp: jak udostępnić LuCI dla WAN?

heh, ale numer. nie zdarzylem jeszcze dopisać tych brakujących lini o RPC a panel webowy zaczął działać z WANu! ciekawe...

swoją drogą Cezary wyjaśnij co to jest to RPC. zaraz to dopiszę do configa, ale przydałaby się wiedza, do czego to służy?

14

Odp: jak udostępnić LuCI dla WAN?

https://pl.wikipedia.org/wiki/Zdalne_wy … _procedury

15 (edytowany przez siutek 2015-10-28 11:09:43)

Odp: jak udostępnić LuCI dla WAN?

dorzuciłem wspomniane wyżej linie i panel z WANu znowu nie działa hmm

panel wstał dopiero po restarcie całego routera, restart transmission nie pomagał.

generalnie (chyba) problem rozwiązany.

16 (edytowany przez secam7 2016-02-05 13:00:06)

Odp: jak udostępnić LuCI dla WAN?

Cezary napisał/a:

Czy otwórz również port 443. LuCI domyślnie przerzuca na https chyba że jawnie mu powiesz żeby tego nie robił.

Jak mam "jawnie powiedzieć" żeby LUCI nie przerzucał na 443, który mam zajęty inną usługą??

17

Odp: jak udostępnić LuCI dla WAN?

W /etc/config/uhttpd jest opcja redirect_https, zmień ją z 1 na 0, zrestartuj usługę.

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