51

Odp: wn841 v13 + LTE + USB

config zone
        option name 'wg0z'
        option input 'ACCEPT'
        option forward 'ACCEPT'
        option output 'ACCEPT'
        option network 'wg0'
        option masq '1'

config forwarding
        option src 'wg0z'
        option dest 'lan'

config forwarding
        option src 'lan'
        option dest 'wg0z'

dodałem zone na kliencie, ale bez zmian ;/

52

Odp: wn841 v13 + LTE + USB

chemik89 napisał/a:

jako typowy wykonywacz skryptów krok po kroku - mógłbym na to nie wpaść big_smile



dobra połączenie mam, jak pisałeś, =sieucieło.
adresy wg sie widzą

to teraz kombinuje jak się tu dostać do sieci klienta

jak można się spodziewać
list allowed_ips '10.10.0.3/32,10.0.3.1/24'
na srv nie dało dostępu do sieci klienta
btw dlaczego w poradniku użyłeś aż /32 a nie /24 ?

W skrócie /32 wskazuje na jeden konkretny adres IP host, a to coś z końcówką /24 wskazuje na 256 adresów IP.
Ale to jest zagadnienie z sieci i podsieci, a nie OpenWrt.

53 (edytowany przez chemik89 2023-08-16 01:23:24)

Odp: wn841 v13 + LTE + USB

Tak, juz sie doszkolilem.
Za to nigdzie nie moge dokopac sie do info jak skonfigurowac wg zeby byl dostep do lan klienta xd przynajmniej taki ktory zadziala ..

Hmm na serwerze tez mam aktywny openvpn

54 (edytowany przez Cezary 2023-08-16 08:07:43)

Odp: wn841 v13 + LTE + USB

Pokaż pełen konfig:

uci show network
uci show firewall
uci show dhcp

Zarówno na serwerze jak i na kliencie

Zaraz się okaże że konfigurujesz wszystko na raz i masz konflikty pomiędzy różnymi vpnami.

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

55 (edytowany przez chemik89 2023-08-16 18:56:45)

Odp: wn841 v13 + LTE + USB

na serwrze działa jeszcze openvpn, ale to tylko dla jednego starego klienta.

klienta z tematu dzisiaj wrzuciłem na działkę, ale z tego co widzę będzie trzeba wykołować antenę GSM, bo nie łapie pewnie zasięgu. Moglełm przestawić LTE>GSM, bo pewnie próbuje bezskutecznie jakieś 3G tam łapać.


server

root@OpenWrt:~# uci show network
network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.packet_steering='1'
network.globals.ula_prefix='fd36:1021:0f4b::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='lan1' 'lan2'
network.@device[0].ipv6='0'
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.ipaddr='10.0.1.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.wan=interface
network.wan.device='wan'
network.wan.proto='dhcp'
network.wan.peerdns='0'
network.wan.dns='1.1.1.1' '1.0.0.1'
network.wan6=interface
network.wan6.device='wan'
network.wan6.proto='dhcpv6'
network.egovpn=interface
network.egovpn.proto='none'
network.egovpn.enabled='1'
network.egovpn.device='tun0'
network.@device[1]=device
network.@device[1].name='wan'
network.@device[1].macaddr='a0:f3:c1xx'
network.wg0=interface
network.wg0.proto='wireguard'
network.wg0.private_key='wHP8TXXXX'
network.wg0.listen_port='55055'
network.wg0.addresses='10.10.0.1/24'
network.@wireguard_wg0[0]=wireguard_wg0
network.@wireguard_wg0[0].public_key='blL3cXXXX'
network.@wireguard_wg0[0].route_allowed_ips='1'
network.@wireguard_wg0[0].allowed_ips='10.10.0.3/32,10.0.3.0/24'
network.@wireguard_wg0[0].persistent_keepalive='25'
network.@wireguard_wg0[0].description='openwrt'
root@OpenWrt:~# uci show firewall
firewall.@defaults[0]=defaults
firewall.@defaults[0].input='ACCEPT'
firewall.@defaults[0].output='ACCEPT'
firewall.@defaults[0].forward='REJECT'
firewall.@defaults[0].synflood_protect='1'
firewall.@defaults[0].flow_offloading='1'
firewall.@defaults[0].flow_offloading_hw='1'
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[0].mtu_fix='1'
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='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].name='Support-UDP-Traceroute'
firewall.@rule[9].src='wan'
firewall.@rule[9].dest_port='33434:33689'
firewall.@rule[9].proto='udp'
firewall.@rule[9].family='ipv4'
firewall.@rule[9].target='REJECT'
firewall.@rule[9].enabled='0'
firewall.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'
firewall.natcapd=include
firewall.natcapd.type='script'
firewall.natcapd.path='/usr/share/natcapd/firewall.include'
firewall.natcapd.family='any'
firewall.natcapd.reload='1'
firewall.miniupnpd=include
firewall.miniupnpd.type='script'
firewall.miniupnpd.path='/usr/share/miniupnpd/firewall.include'
firewall.miniupnpd.family='any'
firewall.miniupnpd.reload='1'
firewall.mwan3=include
firewall.mwan3.type='script'
firewall.mwan3.path='/usr/share/mwan3/mwan3-reload.sh'
firewall.mwan3.reload='0'
firewall.natcap_dns1=rule
firewall.natcap_dns1.name='IPV6 DNS OUTPUT'
firewall.natcap_dns1.family='ipv6'
firewall.natcap_dns1.dest_port='53'
firewall.natcap_dns1.target='DROP'
firewall.natcap_dns1.dest='wan'
firewall.natcap_dns2=rule
firewall.natcap_dns2.name='IPV6 DNS FORWARD'
firewall.natcap_dns2.family='ipv6'
firewall.natcap_dns2.src='lan'
firewall.natcap_dns2.dest='wan'
firewall.natcap_dns2.dest_port='53'
firewall.natcap_dns2.target='DROP'
firewall.@zone[2]=zone
firewall.@zone[2].name='vpn'
firewall.@zone[2].input='ACCEPT'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].forward='ACCEPT'
firewall.@zone[2].masq='1'
firewall.@zone[2].mtu_fix='1'
firewall.@zone[2].network='egovpn'
firewall.@zone[2].enabled='1'
firewall.@rule[12]=rule
firewall.@rule[12].name='OpenVPN'
firewall.@rule[12].target='ACCEPT'
firewall.@rule[12].src='wan'
firewall.@rule[12].proto='udp'
firewall.@rule[12].dest_port='7294'
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src='lan'
firewall.@forwarding[1].dest='vpn'
firewall.@forwarding[1].enabled='1'
firewall.@forwarding[2]=forwarding
firewall.@forwarding[2].src='vpn'
firewall.@forwarding[2].dest='lan'
firewall.@forwarding[2].enabled='1'
firewall.@rule[14]=rule
firewall.@rule[14].src='wan'
firewall.@rule[14].target='ACCEPT'
firewall.@rule[14].proto='udp'
firewall.@rule[14].dest_port='55055'
firewall.@rule[14].name='wireguard'
firewall.@zone[3]=zone
firewall.@zone[3].name='wg'
firewall.@zone[3].input='ACCEPT'
firewall.@zone[3].forward='ACCEPT'
firewall.@zone[3].output='ACCEPT'
firewall.@zone[3].masq='1'
firewall.@zone[3].network='wg0'
firewall.@forwarding[3]=forwarding
firewall.@forwarding[3].src='wg'
firewall.@forwarding[3].dest='wan'
firewall.@forwarding[4]=forwarding
firewall.@forwarding[4].src='wan'
firewall.@forwarding[4].dest='wg'
firewall.@forwarding[5]=forwarding
firewall.@forwarding[5].src='wg'
firewall.@forwarding[5].dest='lan'
firewall.@forwarding[6]=forwarding
firewall.@forwarding[6].src='lan'
firewall.@forwarding[6].dest='wg'
root@OpenWrt:~# uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'
dhcp.@dnsmasq[0].ednspacket_max='1232'
dhcp.@dnsmasq[0].cachesize='2048'
dhcp.@dnsmasq[0].dnsforwardmax='2048'
dhcp.@dnsmasq[0].localservice='0'
dhcp.@dnsmasq[0].rebind_protection='0'
dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv4='server'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.ra_slaac='1'
dhcp.lan.ra_flags='managed-config' 'other-config'
dhcp.lan.force='1'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.wan.ra_flags='none'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
dhcp.@host[0]=host
dhcp.@host[0].dns='1'
dhcp.@host[0].mac='84:F3:EB:F1:9B:7D'
dhcp.@host[0].ip='10.0.1.135'
dhcp.@host[0].name='staw0.local'

do klienta akurat nie mam dostępu, ale to twój standardowy konfig z poradnika + ten routing z posta wyżej (zone wg0z)
siec lan 10.0.3.1, siec wg 10.10.0.3.
allowed tylko 10.10.0.1/32

56

Odp: wn841 v13 + LTE + USB

Allowed_ips w networku ma być listą opcją, nie jedną z wartościami po przecinku. Nawet jak tworzyłeś to ręcznie to tam jest list allowed_ips a nie option.

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

57 (edytowany przez chemik89 2023-08-19 21:56:39)

Odp: wn841 v13 + LTE + USB

jak w miare sensownie wylaczyc ipv6 ? przynajmniej na lanie i wg i mwan3

uci set 'network.lan.ipv6=off'
uci set 'network.wan.ipv6=off'
uci set 'dhcp.lan.dhcpv6=disabled'
/etc/init.d/odhcpd disable
uci commit
?

edit a tu update po nowemu ;p tak raczo na forum openwrt xD

uci set 'network.lan.ipv6=0'
uci set 'network.wan.ipv6=0'
uci set 'dhcp.lan.dhcpv6=disabled'
/etc/init.d/odhcpd disable
uci commit
and then disable RA and DHCPv6 so no IPv6 IPs are handed out:

uci -q delete dhcp.lan.dhcpv6
uci -q delete dhcp.lan.ra
uci commit dhcp
/etc/init.d/odhcpd restart
You can now disable the LAN delegation:

uci set network.lan.delegate="0"
uci commit network
/etc/init.d/network restart
You might as well disable odhcpd:

/etc/init.d/odhcpd disable
/etc/init.d/odhcpd stop
And finally you can delete the IPv6 ULA Prefix:

uci -q delete network.globals.ula_prefix
uci commit network
/etc/init.d/network restart

niektóre urządzenia dostają mi tylko ipv6 i mnie szlag jasny trafia jak sie nie moge dobić po IP a DNS też se akurat odmawia przekierowania z nazwy an v6 xD (np odkurzacz xiaomi mi to ciagle robi)

58

Odp: wn841 v13 + LTE + USB

bez sensu. Po prostu nie kompiluj w obrazie pakietu odhcpd-ipv6only (i odhcp6c i ew ip6tables) to nie będzie działał serwer ipv6 więc urządzenia nic nie dostaną po ipv6. A ty się bawisz wyłączanie tego.

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

59 (edytowany przez chemik89 2023-09-06 23:04:16)

Odp: wn841 v13 + LTE + USB

Juz nie bede zakladal kolejnego watku, mam  jednego r6220 z wireguardem i mwan3 - standardowe konfiguracje. Wan od dostawcy i wanb z modemu lte. Tryb failover wan-wanb
Jak akurat wireguarda mi zestawi na wanb i strace polaczenie lte to mwan3 nie przekieruje go na wan. Do chwili jak mi nie wstanie wanb to nie mam dostepu do urzadzenia przez wg. Ofc reszta urzadzen lokalnie neta dostaje z wan i to jest ok. Jak  temu zaradzic ? Wg nie powinien wznowic polaczenia ?
Lte to hilink, wiec siec jest, tylko neta brak

Podejrzewam ze jakis prosty skrypt gdy nie przejdzie ping - zrob ifdown ifup wanb by tu zalatwil sprawe, ale to chyba nie za ladne rozwiazanie

60

Odp: wn841 v13 + LTE + USB

Restart wireguarda po zmianie wanu. W /etc/mwan3.user możesz to zrobić.

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

61 (edytowany przez chemik89 2023-09-10 16:08:49)

Odp: wn841 v13 + LTE + USB

w sumie to nie znalazłem żadnego przetestowanego w boju skryptu którym można to poprawnie zrobić ...

if [ "${ACTION}" = "ifdown" ] ; then
   ifup wg0
fi

lub jak jak któryś zaliczy DC

if [ "${ACTION}" = "disconnected" ] ; then
   ifup wg0
fi

62

Odp: wn841 v13 + LTE + USB

Czemu robisz na ifdown czy disconnected? Masz zrobić na jak się ponownie połączy.

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

63

Odp: wn841 v13 + LTE + USB

Cezary napisał/a:

Czemu robisz na ifdown czy disconnected? Masz zrobić na jak się ponownie połączy.

# $ACTION
#      <ifup>         Is called by netifd and mwan3track.
#      <ifdown>       Is called by netifd and mwan3track.
#      <connected>    Is only called by mwan3track if tracking was successful.
#      <disconnected> Is only called by mwan3track if tracking has failed.
# $INTERFACE    Name of the interface an action relates to (e.g. "wan" or "wwan").
# $DEVICE       Physical device name of the interface the action relates to (e.g. "eth0" or "wwan0").
#               Note: On an ifdown event, $DEVICE is not available, use $INTERFACE instead.
#

ale jak mam wan i wanb, oba connected.
wg0 zestawione na wanb

wanb zaliczy DC to przecież event connected wcale się nie wywoła ??

64

Odp: wn841 v13 + LTE + USB

Ok, tobie chodzi o to że jak jedno padnie to ma się zbindować na drugim, ok, więc disconnected.

No i:

if [ "${ACTION}" = "disconnected" ]; then

bez tego podwójnego ]] na końcu.

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

65 (edytowany przez chemik89 2023-09-10 16:10:24)

Odp: wn841 v13 + LTE + USB

w sumie to prawie każda akcja mnie interesuje xD
bo jak wan zaliczy DC i wróci to też powinien polecieć reset WG

restart wg bez żadnego warunku dopiero załatwi wszystkie przypadki big_smile

to jeszcze pytanie jak najlepiej restart WG wykonać, bo opinie są podzielone, jedni robią ifdown ifup, ale czasami jakieś dziwne problemy z routingiem im potem wychodzą ...

66

Odp: wn841 v13 + LTE + USB

Też prawda. Jakakolwiek zmiana dowolnego interfejsu może wymaga restartu vpna.

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

67 (edytowany przez chemik89 2023-09-12 11:56:37)

Odp: wn841 v13 + LTE + USB

dobra, borykam się jeszcze tylko z dostępem do panelu konfiguracyjnego hilinka z poziomu serwera WG
allowed ips: 10.10.0.3/32, 10.0.3.0/24, 192.168.8.1/32

nijak nie moge się do tego adresu 192.168.8.1 dobić, z poziomu lanu na routerze z modemem ofc dostęp jest.

root@OpenWrt:~# uci 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'
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='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.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'
firewall.@zone[2]=zone
firewall.@zone[2].name='home'
firewall.@zone[2].input='ACCEPT'
firewall.@zone[2].forward='ACCEPT'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].network='home'
firewall.@zone[2].masq='1'
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src='home'
firewall.@forwarding[1].dest='wan'
firewall.@forwarding[2]=forwarding
firewall.@forwarding[2].src='home'
firewall.@forwarding[2].dest='lan'
firewall.@forwarding[3]=forwarding
firewall.@forwarding[3].src='lan'
firewall.@forwarding[3].dest='home'
firewall.@zone[3]=zone
firewall.@zone[3].name='wg0z'
firewall.@zone[3].input='ACCEPT'
firewall.@zone[3].forward='ACCEPT'
firewall.@zone[3].output='ACCEPT'
firewall.@zone[3].network='wg0'
firewall.@zone[3].masq='1'
firewall.@zone[3].mtu_fix='1'
firewall.@forwarding[4]=forwarding
firewall.@forwarding[4].src='wg0z'
firewall.@forwarding[4].dest='lan'
firewall.@forwarding[5]=forwarding
firewall.@forwarding[5].src='lan'
firewall.@forwarding[5].dest='wg0z'

zestaw z tematu.

68

Odp: wn841 v13 + LTE + USB

Modem na wanie? To zezwól jeszcze pomiędzy wg0z a wan.

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

69 (edytowany przez chemik89 2023-09-12 12:41:05)

Odp: wn841 v13 + LTE + USB

z
firewall.@forwarding[6].src='wan'
firewall.@forwarding[6].dest='wg0z'
działa

edit:
poprawka jednak musi być w obie strony.
tylko czy to bezpieczne ?

70

Odp: wn841 v13 + LTE + USB

Nie gorzej niż zwykle i tak masz przez wan wyście w świat.

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

71 (edytowany przez chemik89 2023-09-14 15:43:55)

Odp: wn841 v13 + LTE + USB

dobra to jako że mam ten router obok, dodałbym jeszcze kartę SD do modemu i postawił tam FTP (do którego kamery IP będą trzaskać jakieś krótkie nagrania lub zdjęcia.

Jaki będzie najlżejszy system plików dla cpu ? exfat /ext2 ?
błędy zapisu są dla mnie bez znaczenia, byle cała partycja nie blokowała mi systemu przy niepowodzeniach ;p

Klient ftp to chyba vftpd będzie najlepszy ?

btw - przyczyną braku zasięgu był ... oderwany drucik od moda USB na płytce.
Przylutowany do rezystora szybko się oderwał, pozbyłem się tych 2 rezystorów pomiędzy D+ i D- do masy całkowicie i przylutowałem do pól.

72

Odp: wn841 v13 + LTE + USB

ext2

Tylko pamiętaj żeby uruchamiać serwer ftp po zamontowaniu się już zasobów dyskowych,

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

73 (edytowany przez chemik89 2023-09-14 15:59:57)

Odp: wn841 v13 + LTE + USB

hmm na ext2 nie ma kmoda ? on jest wbudowany, czy wciągnięty w ext4 ?

74

Odp: wn841 v13 + LTE + USB

W module od ext4, zintegrowane jest. Tyle że ext4 ma kronikę a jak będziesz używał karty sd to dobrze by było żeby tam było jak najmniej zapisów, dlatego też ext2.

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

75 (edytowany przez chemik89 2023-09-14 20:25:35)

Odp: wn841 v13 + LTE + USB

hmm jak w tym modemie e3272 się dostać do karty sd w hilinku ?
nie widzę jej nigdzie ani nie ma żadnej reakcji w logu na jej włożenie.

root@OpenWrt:~# ls /dev/
bus                 gpiochip1           mtd0                mtd2ro              mtd5                mtdblock1           mtdblock6           port                shm                 urandom
console             gpiochip2           mtd0ro              mtd3                mtd5ro              mtdblock2           net                 ppp                 tty                 watchdog
cpu_dma_latency     kmsg                mtd1                mtd3ro              mtd6                mtdblock3           network_latency     ptmx                ttyS0               watchdog0
full                log                 mtd1ro              mtd4                mtd6ro              mtdblock4           network_throughput  pts                 ttyS1               zero
gpiochip0           memory_bandwidth    mtd2                mtd4ro              mtdblock0           mtdblock5           null                random              ttyS2


root@OpenWrt:~# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

mam kmod-usb-storage

usbmode -l nie zwraca nic.


T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=14db Rev= 1.02
S:  Manufacturer=HUAWEI Technology
S:  Product=HUAWEI Mobile
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=06 Prot=00 Driver=cdc_ether
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms