1 (edytowany przez dob46 2021-02-21 16:21:07)

Temat: Przekierowanie portu ipv6

Witam, mam problem z przekierowaniem portu dla nginx'a wystawionego po ipv6 (korzystam z tunelu he.net).
nginx mam skonfigurowany na następujące porty :

        listen 80 default_server;
        listen [::]:80 default_server;
        listen 443 ssl http2;
        listen [::]:443 ssl;
        listen 81 default_server;
        listen [::]:81 default_server;
        listen 444 ssl http2;
        listen [::]:444 ssl;

Portów 80 i 443 używam w lanie, a 81 i 444 w wanie. Problem jest w tym żeby działało przekierowanie z portu zewnętrznego portu 80 do portu 81 ( tak samo z portu 443 do 444).

2

Odp: Przekierowanie portu ipv6

Tak po prostu nie dzała?

config redurect
    option target 'ACCEPT'
    option src 'wan'
    option dest 'lan'
    option dest_ip 'xxxx:xxxx:xxxx:xxxx:xxxxx:xxxx:xxxx:xxxxx'
    option family 'ipv6'
    option dest_port '81'
    option src_dport '80'

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

3 (edytowany przez dob46 2021-02-21 22:05:40)

Odp: Przekierowanie portu ipv6

wstawiłem to co napisałeś ( jako adres ipv6 dałem 1 z adresów br-lan global ) i mam connection refused. Do kontroli używam łącza Orange. Adres z br-lan po lanie działa jak należy

C:\WINDOWS\system32>"C:\Program Files (x86)\GnuWin32\bin\wget.exe" http://[2001:470:70:44a::2]:80/
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
--2021-02-21 21:54:39--  http://[2001:470:70:44a::2]:80/
Łączenie się z 2001:470:70:44a::2:80... nieudane: Connection refused.
br-lan    Link encap:Ethernet  HWaddr 3C:37:86:2A:CA:0B
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd39:2250:c901::1/60 Scope:Global
          inet6 addr: fe80::3e37:86ff:fe2a:ca0b/64 Scope:Link
          inet6 addr: 2001:470:71:44a::1/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:785168 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3026754 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:75667298 (72.1 MiB)  TX bytes:3892431222 (3.6 GiB)
root@OpenWrt:~# ifconfig 6in4-wan6
6in4-wan6 Link encap:IPv6-in-IPv4
          inet6 addr: 2001:470:70:44a::2/64 Scope:Global
          inet6 addr: fe80::2582:250a/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP  MTU:1280  Metric:1
          RX packets:1103966 errors:0 dropped:0 overruns:0 frame:0
          TX packets:602141 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3036305291 (2.8 GiB)  TX bytes:50382765 (48.0 MiB)
firewall.@rule[6]=rule
firewall.@rule[6].name='test nginx'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='lan'
firewall.@rule[6].dest_ip='fd39:2250:c901::1'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].dest_port='81'
firewall.@rule[6].src_port='80'

4

Odp: Przekierowanie portu ipv6

a czy tam nie powinno być redirect oraz src_dport ?

Xiaomi AX3000T @ Netgear R6220
* DVBT2 - T230C *

5

Odp: Przekierowanie portu ipv6

Oczywiście, redirect, poprawiłem post

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