Działa od strzała, dzięki wielkie.
Nie jesteś zalogowany. Proszę się zalogować lub zarejestrować.
eko.one.pl → Posty przez andix84
Działa od strzała, dzięki wielkie.
OK, faktycznie są.
Jest szansa na obraz dla tl-wr1043nd v1?
Właśnie też wpadłem rano na ten opis, będę sprawdzać.
Robiłem po kolei to co było w Twoim poradniku o freeradius2.
Dane użytkownika mam wpisane w /etc/freeradius3/users
root@OpenWrt:/etc/freeradius3/mods-enabled# cat mschap
# -*- text -*-
#
# $Id: 4673fa7f9fd1d9931fcf1e4e1cdd9bb656b1d434 $
# Microsoft CHAP authentication
#
# This module supports MS-CHAP and MS-CHAPv2 authentication.
# It also enforces the SMB-Account-Ctrl attribute.
#
mschap {
#
# If you are using /etc/smbpasswd, see the 'passwd'
# module for an example of how to use /etc/smbpasswd
# if use_mppe is not set to no mschap will
# add MS-CHAP-MPPE-Keys for MS-CHAPv1 and
# MS-MPPE-Recv-Key/MS-MPPE-Send-Key for MS-CHAPv2
#
# use_mppe = no
# if mppe is enabled require_encryption makes
# encryption moderate
#
# require_encryption = yes
# require_strong always requires 128 bit key
# encryption
#
# require_strong = yes
# The module can perform authentication itself, OR
# use a Windows Domain Controller. This configuration
# directive tells the module to call the ntlm_auth
# program, which will do the authentication, and return
# the NT-Key. Note that you MUST have "winbindd" and
# "nmbd" running on the local machine for ntlm_auth
# to work. See the ntlm_auth program documentation
# for details.
#
# If ntlm_auth is configured below, then the mschap
# module will call ntlm_auth for every MS-CHAP
# authentication request. If there is a cleartext
# or NT hashed password available, you can set
# "MS-CHAP-Use-NTLM-Auth := No" in the control items,
# and the mschap module will do the authentication itself,
# without calling ntlm_auth.
#
# Be VERY careful when editing the following line!
#
# You can also try setting the user name as:
#
# ... --username=%{mschap:User-Name} ...
#
# In that case, the mschap module will look at the User-Name
# attribute, and do prefix/suffix checks in order to obtain
# the "best" user name for the request.
#
# ntlm_auth = "/path/to/ntlm_auth --request-nt-key --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} --challenge=%{%{mschap:Challenge}:-00} --nt-response=%{%{mschap:NT-Response}:-00}"
# The default is to wait 10 seconds for ntlm_auth to
# complete. This is a long time, and if it's taking that
# long then you likely have other problems in your domain.
# The length of time can be decreased with the following
# option, which can save clients waiting if your ntlm_auth
# usually finishes quicker. Range 1 to 10 seconds.
#
# ntlm_auth_timeout = 10
# An alternative to using ntlm_auth is to connect to the
# winbind daemon directly for authentication. This option
# is likely to be faster and may be useful on busy systems,
# but is less well tested.
#
# Using this option requires libwbclient from Samba 4.2.1
# or later to be installed. Make sure that ntlm_auth above is
# commented out.
#
# winbind_username = "%{mschap:User-Name}"
# winbind_domain = "%{mschap:NT-Domain}"
#
# Information for the winbind connection pool. The configuration
# items below are the same for all modules which use the new
# connection pool.
#
pool {
# Connections to create during module instantiation.
# If the server cannot create specified number of
# connections during instantiation it will exit.
# Set to 0 to allow the server to start without the
# winbind daemon being available.
start = ${thread[pool].start_servers}
# Minimum number of connections to keep open
min = ${thread[pool].min_spare_servers}
# Maximum number of connections
#
# If these connections are all in use and a new one
# is requested, the request will NOT get a connection.
#
# Setting 'max' to LESS than the number of threads means
# that some threads may starve, and you will see errors
# like 'No connections available and at max connection limit'
#
# Setting 'max' to MORE than the number of threads means
# that there are more connections than necessary.
max = ${thread[pool].max_servers}
# Spare connections to be left idle
#
# NOTE: Idle connections WILL be closed if "idle_timeout"
# is set. This should be less than or equal to "max" above.
spare = ${thread[pool].max_spare_servers}
# Number of uses before the connection is closed
#
# 0 means "infinite"
uses = 0
# The number of seconds to wait after the server tries
# to open a connection, and fails. During this time,
# no new connections will be opened.
retry_delay = 30
# The lifetime (in seconds) of the connection
#
# NOTE: A setting of 0 means infinite (no limit).
lifetime = 86400
# The pool is checked for free connections every
# "cleanup_interval". If there are free connections,
# then one of them is closed.
cleanup_interval = 300
# The idle timeout (in seconds). A connection which is
# unused for this length of time will be closed.
#
# NOTE: A setting of 0 means infinite (no timeout).
idle_timeout = 600
# NOTE: All configuration settings are enforced. If a
# connection is closed because of "idle_timeout",
# "uses", or "lifetime", then the total number of
# connections MAY fall below "min". When that
# happens, it will open a new connection. It will
# also log a WARNING message.
#
# The solution is to either lower the "min" connections,
# or increase lifetime/idle_timeout.
}
passchange {
# This support MS-CHAPv2 (not v1) password change
# requests. See doc/mschap.rst for more IMPORTANT
# information.
#
# Samba/ntlm_auth - if you are using ntlm_auth to
# validate passwords, you will need to use ntlm_auth
# to change passwords. Uncomment the three lines
# below, and change the path to ntlm_auth.
#
# ntlm_auth = "/usr/bin/ntlm_auth --helper-protocol=ntlm-change-password-1"
# ntlm_auth_username = "username: %{mschap:User-Name}"
# ntlm_auth_domain = "nt-domain: %{mschap:NT-Domain}"
# To implement a local password change, you need to
# supply a string which is then expanded, so that the
# password can be placed somewhere. e.g. passed to a
# script (exec), or written to SQL (UPDATE/INSERT).
# We give both examples here, but only one will be
# used.
#
# local_cpw = "%{exec:/path/to/script %{mschap:User-Name} %{MS-CHAP-New-Cleartext-Password}}"
#
# local_cpw = "%{sql:UPDATE radcheck set value='%{MS-CHAP-New-NT-Password}' where username='%{SQL-User-Name}' and attribute='NT-Password'}"
}
# For Apple Server, when running on the same machine as
# Open Directory. It has no effect on other systems.
#
# use_open_directory = yes
# On failure, set (or not) the MS-CHAP error code saying
# "retries allowed".
# allow_retry = yes
# An optional retry message.
# retry_msg = "Re-enter (or reset) the password"
}Z którego pliku? Nie widzę takiej sekcji w radiusd.conf
Próbuję uruchomić freeradiusa3 dla wifi, wyrzuca problem z hasłem.
Konfiguracja jest taka:
klient wifi - router z tomato 192.168.2.1 (ustawione uwierzytelnianie wpa/wpa2 enterpr.) - router z openwrt 192.168.2.51 wan (serwer radius). Robiłem wg poradnika o freeradius2.
Serwer się uruchamia, natomiast nie mogę sprawdzić klientem na opewrt bo wyrzuca segmentation fault (zero logów na serwerze). Podłączenie telefonu generuje mnóstwo logów, natomiast ostatecznie się nie łączy (na kliencie wyświetla się logowanie, można zobaczyć certyfikat). Hasło oczywiście jest ustawione.
Jakieś sugestie?
Sun Jul 28 07:06:29 2019 : Debug: (8) eap_mschapv2: Auth-Type MS-CHAP {
Sun Jul 28 07:06:29 2019 : Debug: (8) eap_mschapv2: modsingle[authenticate]: calling mschap (rlm_mschap) for request 8
Sun Jul 28 07:06:29 2019 : WARNING: (8) mschap: No Cleartext-Password configured. Cannot create NT-Password
Sun Jul 28 07:06:29 2019 : WARNING: (8) mschap: No Cleartext-Password configured. Cannot create LM-Password
Sun Jul 28 07:06:29 2019 : Debug: (8) mschap: Creating challenge hash with username: al
Sun Jul 28 07:06:29 2019 : Debug: (8) mschap: Client is using MS-CHAPv2
Sun Jul 28 07:06:29 2019 : ERROR: (8) mschap: FAILED: No NT/LM-Password. Cannot perform authentication
Sun Jul 28 07:06:29 2019 : ERROR: (8) mschap: MS-CHAP2-Response is incorrectCzy uruchamianie np. co 10 minut skryptu który jest zapisany w katalogu root może mieć niekorzystny wpływ na pamięć flash routera?
Ostatnio coś takiego skonfigurowałem na gargoyle. Wystarczy router ustawić jako most bezprzewodowy i podpiąć drukarkę do usb. Instalując drukarkę dodajesz nowy port TCP/IP z adresem takim jaki ma w sieci lokalnej router - działa.
Dzięki.
Pierwszy raz wgrałem 18.06 przez tą procedurę z cofaniem softu, patchem do ssh itd...
Podepnę się przy okazji Xiaomi Mi 3G...
Czy jeśli już mam wgrane openwrt 18.06 (przez kernel i rootfs) to kolejne obrazy mogę ładować normalnie przez sysupgrade?
Na pewno, ale zdarzyło mi się to pierwszy raz, na stronce z obrazami.
Jest OK, dziwna sytuacja, po wejściu do katalogu miałem stare obrazy, a jak odświeżyłem stronę to zmieniły się na nowe.
Do nowego mifi nie został wkompilowany ostatni easyconfig?
Ostatnia aktualizacja lede nie chce się wgrać na ten router:
root@LEDE:/tmp# sysupgrade -n lede-17.01-snapshot-r3491-889638c-ramips-mt7620-wt
3020-8M-squashfs-sysupgrade.bin
Device wt3020 not supported by this image
Supported devices: wt3020-8M
Image check 'fwtool_check_image' failed.
root@LEDE:/tmp#Walczę z ustawieniem VPN aby cały ruch był przez niego kierowany.
Wgrałem na Nexxa WT3020F ostatnie czyste LEDE, dodałem easyconfig, zainstalowałem OpenVPN i skonfigurowałem klienta w trybie tap i to działa bo na serwerze widać urządzenie na liście klientów.
Nie mogę rozsupłać w jaki sposób ustawić klienta aby cały ruch szedł przez VPN?
Oto co zrobiłem na routerze kliencie:
opkg update
opkg install easyconfig
# opkg install uhttpd
/etc/init.d/uhttpd enable
uci set uhttpd.main.ubus_prefix=/ubus
uci set uhttpd.main.home='/www'
uci commit uhttpd
/etc/init.d/rpcd restart
/etc/init.d/uhttpd restart
opkg install chat comgt-ncm comgt uqmi usb-modeswitch
opkg install kmod-usb-net-cdc-ether kmod-usb-net-cdc-ncm kmod-usb-net-huawei-cdc-ncm
opkg install kmod-usb-net-qmi-wwan kmod-usb-net-sierrawireless kmod-usb-net-rndis
opkg install kmod-usb-serial-wwan kmod-usb-serial
opkg install kmod-usb-serial-option kmod-usb-serial-qualcomm kmod-usb-serial-sierrawireless
opkg install openvpn-openssl
uci set openvpn.klient=openvpn
uci set openvpn.klient.enabled=1
uci set openvpn.klient.dev=tap
uci set openvpn.klient.proto=tcp
uci set openvpn.klient.log=/tmp/openvpn.log
uci set openvpn.klient.verb=3
uci set openvpn.klient.ca=/etc/openvpn/ca.crt
uci set openvpn.klient.cert=/etc/openvpn/klient.crt
uci set openvpn.klient.key=/etc/openvpn/klient.key
uci set openvpn.klient.client=1
uci set openvpn.klient.remote_cert_tls=server
uci set openvpn.klient.remote="adres_serwera 1195"
uci commit openvpn
/etc/init.d/openvpn enable
/etc/init.d/openvpn start
Ponieważ w założeniach było, że klient ma otrzymywać adres z puli sieci lokalnej, należy jeszcze utworzyć odpowiednie połączenie (bridge) pomiędzy OpenVPN a interfejsem lan. W tym celu tworzymy dodatkowy plik zawierający polecenia łączenia tych interfejsów przy starcie systemu (np o nazwie /etc/init.d/openvpn-startup)
#!/bin/sh /etc/rc.common
START=94
start() {
openvpn --mktun --dev tap0
brctl addif br-lan tap0
ifconfig tap0 0.0.0.0 promisc up
}
stop() {
ifconfig tap0 0.0.0.0 down
brctl delif br-lan tap0
openvpn --rmtun --dev tap0
}
Zostaje jeszcze włączenie tego pliku do procedur startowych systemu
# chmod 755 /etc/init.d/openvpn-startup
# /etc/init.d/openvpn-startup enable
# /etc/init.d/openvpn-startup startI teraz, jeśli na routerze jest uruchomiony DHCP to urządzenie wpięte w switch pobiera adres lokalny, natomiast jeśli wyłączę DHCP i ustawię na sztywno adres z sieci VPN to nie pobiera adresu z DHCP serwera, a bym chciał aby tak to działało (aby cały ruch był kierowany przez VPN). Kiedy na urządzeniu klienckim ustawię sztywno adres to na router kliencki VPN mogę się dostać, ale na serwer już nie.
Co pominąłem?
Sieć wygląda tak:
serwer openvpn (DHCP) <router z tomato> -- internet -- klient openvpn (cały ruch przez vpn) <router z lede>Dodam że kiedy klientem openvpn jest router z tomato to to działa.
Konfig z klienta tomato:
root@karol:/tmp/etc/openvpn/client1# cat config.ovpn
# Automatically generated configuration
daemon
client
dev tap11
proto tcp-client
remote adres_serwera 1195
resolv-retry 30
nobind
persist-key
persist-tun
comp-lzo adaptive
verb 3
ca ca.crt
cert client.crt
key client.key
status-version 2
status status
# Custom Configuration
script-security 2
up /tmp/bridgeTAP
log-append /var/log/openvpn.logPewnie jest to jakaś bzdurka, ale nie mogę znaleźć na nią odpowiedzi.
Czy była by możliwość dodania ustawiania WAN jako wifi client?
Czy w przypadku kiedy easyconfig jest wkompilowany w obraz, to można go jakoś aktualizować, czy tylko ponowna kompilacja/czyste lede + instalacja ręcznie?
Kiedy można spodziewać się nowych obrazów?
VID35 musisz ustawiać na routerze, o ile ma opcje żeby takie coś zrobić. Jeśli masz możliwość definiowania VLAN to VID pewnie też. Funboxy mają to już domyślnie poustawiane.
urządzenia zakańczające sieć optyczną u odbiorców ONT (Optical Network Termination), zwane terminalami abonenckimiTo taki media-konwerter, albo jak to nazwałeś modem światło>LAN. Do niego podłącza się funboxa2 - wtedy jest możliwość jego wyeliminowania (ale wziąć pewnie i tak będziesz go musiał). Ustawiasz WAN na VLANie z VID 35 i tyle. Są opisy tego na necie.
Jeśli weźmiesz f3 to on ma ONT zintegrowane więc tu już nie masz możliwości manewru.
Jakieś 2 miesiące temu szwagier brał FTTH no i chcieli mu dać f3, ale że ma światłowód zakończony w takiej skrzyneczce w ścianie i on się tam nie zmieścił to dostał osobno ONT i f2.
Jak nie chcesz tego ich badziewia (funbox3), to zagadaj żeby Ci dali funbox2 i osobno ONT, wtedy podłączysz swój router przez ppoe.
root@LEDE:~# ifconfig -a
br-LAN2 Link encap:Ethernet HWaddr xxxx
inet addr:192.168.2.10 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5293 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1198370 (1.1 MiB) TX bytes:738 (738.0 B)
br-lan Link encap:Ethernet HWaddr xxxx
inet addr:192.168.4.1 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: xxxx/64 Scope:Link
inet6 addr: fd59:aa40:dbe4::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29232 errors:0 dropped:0 overruns:0 frame:0
TX packets:34417 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5153347 (4.9 MiB) TX bytes:26894077 (25.6 MiB)
eth0 Link encap:Ethernet HWaddr xxxx
inet6 addr: xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10700798 errors:0 dropped:3 overruns:0 frame:0
TX packets:10698318 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1465941452 (1.3 GiB) TX bytes:1214440410 (1.1 GiB)
Interrupt:4
eth0.1 Link encap:Ethernet HWaddr xxxx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29250 errors:0 dropped:18 overruns:0 frame:0
TX packets:34417 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5154175 (4.9 MiB) TX bytes:26894077 (25.6 MiB)
eth0.2 Link encap:Ethernet HWaddr xxxx
inet addr:192.168.3.110 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7196440 errors:0 dropped:0 overruns:0 frame:0
TX packets:3910177 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9615649514 (8.9 GiB) TX bytes:305123492 (290.9 MiB)
eth0.3 Link encap:Ethernet HWaddr xxxx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:518 errors:0 dropped:4 overruns:0 frame:0
TX packets:4793 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:40744 (39.7 KiB) TX bytes:1226132 (1.1 MiB)
ifb0 Link encap:Ethernet HWaddr xxxx
BROADCAST NOARP MTU:1500 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:32
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
ifb1 Link encap:Ethernet HWaddr xxxx
BROADCAST NOARP MTU:1500 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:32
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
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:528 errors:0 dropped:0 overruns:0 frame:0
TX packets:528 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:40446 (39.4 KiB) TX bytes:40446 (39.4 KiB)
tap0 Link encap:Ethernet HWaddr xxxx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:698628 errors:0 dropped:693842 overruns:0 frame:0
TX packets:520 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:231794520 (221.0 MiB) TX bytes:48384 (47.2 KiB)
wlan0 Link encap:Ethernet HWaddr xxxx
inet6 addr: xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:3728 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:711750 (695.0 KiB)
eko.one.pl → Posty przez andix84
Forum oparte o PunBB, wspierane przez Informer Technologies, Inc