DOMANDA Cavo Eterneth,collegamenti e installazione linea

  • Autore discussione Autore discussione BuSte
  • Data d'inizio Data d'inizio
Pubblicità
Ok, non ti aspettare grandi velocità in trasferimento file, in RDP invece dovresti andare bene
Purtroppo lo so, ma spero che aumentino la copertura a breve considerando che openfiber ha portato la fibra fino a 4 civici prima del mio e poi ha detto basta :)
In tal caso si può fare
Postami la config del client wireguard, cancellando ovviamente IP remoto e le voci Public/Private Key
[Interface]
PrivateKey =
ListenPort = 13231
Address = 10.1.1.2/24
DNS = dns server azienda

[Peer]
PublicKey =
AllowedIPs = 192.168.9.0/24, 192.168.2.0/24, 192.168.0.0/24, 10.1.1.1/32
Endpoint = ddns mikrotik :13231
PersistentKeepalive = 25
( questa configurazione ? dovrei aver omesso le cose principali ma per il resto dovrebbero esserci le info che hai chiesto , credo )
Se vuoi accedere alla configurazione del mikrotik che fa da server wiregurad tramite il tunnel wireguard, devi impostare nel firewall una regola nella chain input action accept con in-interface-list= la lista creata per l'interfaccia wireguard, chiaramente prima dell'eventuale regola di drop della chain input
eccolo li un'altra regola che avevo e devo aver cancellato, perchè la prima volta che ho provato si connetteva al mikrotik da esterno poi devo aver toccato qualcosa ma di buono c'è che almeno ho capito a cosa serviva quella regola:)
 
IP LAN del PC di lavoro a cui vuoi accedere dalla rete di casa tramite wireguard?
Chiaramente dovrà essere attivo wireguard client sul pc di lavoro quando vorrai accederci

Mi serve anche l'elenco degli AllowedIP sul peer wireguard nel router mikrotik, così vedo se va modificato
 
Ok sul mikrotik a casa devi inserire questo

Codice:
/ip route
add comment="ROUTE IP LAVORO TRAMITE TUNNELL WIREGUARD" disabled=no distance=1 dst-address=192.168.0.182/32 gateway=<nome-interfaccia-wireguard>



/ip firewall address-list
add address=192.168.0.182 list=HostPcLavoro

/ip firewall filter
add action=accept chain=forward comment="FWD - ACCETTA DA LAN A PC LAVORO" dst-address-list=HostPcLavoro src-address-list=<AddressListReteCasa>  \
  in-interface-list=<InterfaceListReteCasa> out-interface-list=<InterfaceListWireguard>



La roba tra < e > devi sostituirla con le configurazioni nel tuo mikrotik
In questo modo diciamo al mikrotik che deve instradare i pacchetti verso 192.168.0.182 sul tunnel wireguard, e da firewall abilitiamo la possibilità di fare questo forward dalla rete lan di casa. I pacchetti di ritorno vengono già gestiti dalle regole standard per accettare le connessioni established
 
Ok sul mikrotik a casa devi inserire questo

Codice:
/ip route
add comment="ROUTE IP LAVORO TRAMITE TUNNELL WIREGUARD" disabled=no distance=1 dst-address=192.168.0.182/32 gateway=<nome-interfaccia-wireguard>



/ip firewall address-list
add address=192.168.0.182 list=HostPcLavoro

/ip firewall filter
add action=accept chain=forward comment="FWD - ACCETTA DA LAN A PC LAVORO" dst-address-list=HostPcLavoro src-address-list=<AddressListReteCasa> \
in-interface-list=<InterfaceListReteCasa> out-interface-list=<InterfaceListWireguard>


La roba tra < e > devi sostituirla con le configurazioni nel tuo mikrotik
In questo modo diciamo al mikrotik che deve instradare i pacchetti verso 192.168.0.182 sul tunnel wireguard, e da firewall abilitiamo la possibilità di fare questo forward dalla rete lan di casa. I pacchetti di ritorno vengono già gestiti dalle regole standard per accettare le connessioni established
ho messo queste regole e ho ricontrollato piu volte ma rdp non prende la connessione al pc lavoro.
 
hai controllato se RDP sul pc di lavoro è attivo, se sul windows firewall hai la regola per la porta 3389, ecc ?
 
Torno di nuovo con un problema... con la configurazione di questa discussione e con RouterOS 7.19.1 del RB4011iGS continuo a perdere la connessione tutti i pomeriggi, solo che per farla ripartire dovrei spegnere e riaccendere il router.
quando riaccendo riprende la connessione. nel terminale mi da questo errore:
dhcp,critical,error dhcp-client on vlan1038-dati lost IP address 5.91.219.188 - received NAK from dhcp server 5.91.219.189.
non riesco a capire cosa è cambiato da allora ad adesso e come potrei risolvere il problema che immagino sia nelle impostazioni del client DHCP. a qualcuno succede la stessa cosa ? come posso risolvere ? grazie
 
hai un dhcp client impostato su un'interfaccia chiamata vlan1038-dati a cui viene dato via dhcp l'indirizzo 5.91.219.188, scade la lease e routeros chiede al dhcp server di rinnovare l'IP dicendo che ha già quell'indirizzo, il dhcp server risponde NAK ovvero non va bene quell'indirizzo e dovrebbe dargli un altro IP.
Cos'è quest'interfaccia vlan1038-dati su cui ottieni da dhcp un ip pubblico?
 
Cos'è quest'interfaccia vlan1038-dati su cui ottieni da dhcp un ip pubblico?

vlan1038-dati è l'interfaccia su cui ricevo ip pubblico della connessione Vodafone FWA si , ed è in bridge WAN .

hai un dhcp client impostato su un'interfaccia chiamata vlan1038-dati a cui viene dato via dhcp l'indirizzo 5.91.219.188, scade la lease e routeros chiede al dhcp server di rinnovare l'IP dicendo che ha già quell'indirizzo, il dhcp server risponde NAK ovvero non va bene quell'indirizzo e dovrebbe dargli un altro IP.
il problema è che quando rinnovo manualmente l'IP ricevuto cambia ma e tutto funziona ma quando lo fa in automatico allo scadere del lease non funziona, stamattina di nuovo sono nella stessa situazione e non funziona, si vede che ha fatto un controllo a metà tempo e non è andato a buon fine.
 
mi metti tra i tag [ CODE ] il contenuto completo del comando
/export
così intanto vedo se ci sono errori di configurazione.
 
mi metti tra i tag [ CODE ] il contenuto completo del comando
/export
così intanto vedo se ci sono errori di configurazione.
ecco tutta la configurazione:
Codice:
/export
# 2025-06-13 10:22:34 by RouterOS 7.19.1
# software id = XGXR-89RQ
#
# model = RB4011iGS+
# serial number = HFA098M27CH
/interface bridge
add comment="BRIDGE LAN GIADA" name=brGiada
add comment="BRIDGE LAN" name=brLAN port-cost-mode=short
add comment="BRIDGE WIFI OSPITI" name=brOspiti
add comment="BRIDGE WAN" name=brWAN
/interface ethernet
set [ find default-name=ether1 ] comment="ETH 1 - WAN - FWA VODAFONE"
set [ find default-name=ether2 ] comment="ETH 2 - WAN - VOIP"
set [ find default-name=ether3 ] comment="ETH 3 - LAN"
set [ find default-name=ether4 ] comment="ETH 4 - LAN"
set [ find default-name=ether5 ] comment="ETH 5 - LAN"
set [ find default-name=ether6 ] comment="ETH 6 - LAN"
set [ find default-name=ether7 ] comment="ETH 7 - LAN"
set [ find default-name=ether8 ] comment="ETH 8 - LAN"
set [ find default-name=ether9 ] comment="ETH 9 - LAN"
set [ find default-name=ether10 ] comment="ETH 10 - LAN"
/interface wireguard
add listen-port=13232 mtu=1420 name=wireguard1
/interface vlan
add comment="VLAN 1038 DATI VODAFONE FWA" interface=brWAN name=vlan1038-dati vlan-id=1038
/caps-man configuration
add channel.frequency=2432,2447,2467 comment="WIFI 2.4 GHZ CASA -   SSID=AriSte     PASSWORD=12456789" country=\
    italy datapath.bridge=brLAN .client-to-client-forwarding=yes mode=ap name=wifiCasa-2.4 \
    security.authentication-types=wpa-psk,wpa2-psk .encryption=aes-ccm,tkip ssid=AriSte
add comment="WIFI 2.4 GHZ  OSPITI -   SSID=AriSte-Guest PASSWORD=12456789" country=italy datapath.bridge=\
    brOspiti .client-to-client-forwarding=no mode=ap name=wifiOspiti-2.4 security.authentication-types=\
    wpa-psk,wpa2-psk .encryption=aes-ccm,tkip ssid=AriSte-Guest
add channel.frequency=5180,5240,5300,5500,5560,5620,5680 comment=\
    "WIFI 5 GHZ CASA  -   SSID=AriSte-5G    PASSWORD=12456789" country=italy datapath.bridge=brLAN \
    .client-to-client-forwarding=yes mode=ap name=wifiCasa-5 security.authentication-types=wpa-psk,wpa2-psk \
    .encryption=aes-ccm,tkip ssid=AriSte-5G
add comment="WIFI 5 GHZ GIADA  -   SSID=Giada-5G    PASSWORD=12456789" country=italy datapath.bridge=brGiada \
    .client-to-client-forwarding=yes mode=ap name=wifiGiada-5 security.authentication-types=wpa-psk,wpa2-psk \
    .encryption=aes-ccm,tkip ssid=G-5G
add channel.frequency=2432,2447,2467 comment="WIFI 2.4 GHZ INTERNA -   SSID=Giada-2.4G     PASSWORD=12456789" \
    country=italy datapath.bridge=brGiada .client-to-client-forwarding=yes mode=ap name=wifiGiada2.4 \
    security.authentication-types=wpa-psk,wpa2-psk .encryption=aes-ccm,tkip ssid=G-2.4G
/interface list
add name=WAN
add name=LAN
add name=OSPITI
add name=Wg1
add name=LAN_GIADA
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add comment="POOL DHCP LAN" name=poolDhcpLan ranges=192.168.9.100-192.168.9.199
add comment="POOL DHCP WIFI OSPITI" name=poolDhcpOspiti ranges=172.20.1.100-172.20.1.199
add comment="POOL DHCP Dispositivi IoT" name=poolDhcpIoT ranges=192.168.9.201-192.168.9.250
add comment="POOL DHCP LAN GIADA" name=poolDhcpGiada ranges=192.168.10.100-192.168.10.199
/ip dhcp-server
add address-pool=poolDhcpLan authoritative=after-2sec-delay comment="DHCP RETE LAN" interface=brLAN lease-time=4h \
    name=dhcpLan
add address-pool=poolDhcpOspiti comment="DHCP WIFI OSPITI" interface=brOspiti name=dhcpWifiOspiti
add address-pool=poolDhcpGiada authoritative=after-2sec-delay comment="DHCP LAN GIADA" interface=brGiada \
    lease-time=2h name=dhcpLanGiada
/port
set 0 name=serial0
set 1 name=serial1
/queue simple
add comment="LIMITE WIFI OSPITI  50M / 20M" max-limit=50M/20M name=queueWifiOspiti target=brOspiti
/system logging action
set 0 memory-lines=10000
/caps-man manager
set ca-certificate=CACapsman certificate=CertCapsman enabled=yes
/caps-man manager interface
set [ find default=yes ] forbid=yes
add disabled=no interface=brLAN
add disabled=no interface=brGiada
/caps-man provisioning
add action=create-dynamic-enabled comment="PROVISIONING WIFI 2.4 GHZ" hw-supported-modes=gn master-configuration=\
    wifiCasa-2.4 name-format=identity slave-configurations=wifiOspiti-2.4,wifiGiada2.4
add action=create-dynamic-enabled comment="PROVISIONING WIFI 5 GHZ" hw-supported-modes=ac master-configuration=\
    wifiCasa-5 name-format=identity slave-configurations=wifiGiada-5
add action=create-dynamic-enabled comment="PROVISIONING WIFI-GIADA 2.4 GHZ" disabled=yes hw-supported-modes=gn \
    master-configuration=wifiGiada2.4 name-format=identity
add action=create-dynamic-enabled comment="PROVISIONING WIFI-GIADA 5 GHZ" disabled=yes hw-supported-modes=ac \
    master-configuration=wifiGiada-5 name-format=identity
/certificate settings
set builtin-trust-anchors=not-trusted
/interface bridge port
add bridge=brWAN comment="WAN FWA VODAFONE" interface=ether1
add bridge=brWAN comment="VOIP\?" interface=ether2
add bridge=brLAN comment=LAN interface=ether3
add bridge=brLAN interface=ether4
add bridge=brLAN interface=ether5
add bridge=brLAN interface=ether6
add bridge=brLAN interface=ether7
add bridge=brLAN interface=ether8
add bridge=brLAN interface=ether9
add bridge=brLAN interface=ether10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/interface list member
add interface=brLAN list=LAN
add interface=brWAN list=WAN
add interface=vlan1038-dati list=WAN
add interface=brOspiti list=OSPITI
add interface=wireguard1 list=Wg1
add interface=brGiada list=LAN_GIADA
/interface ovpn-server server
add mac-address=FE:01:A5:80:76:81 name=ovpn-server1
/interface wireguard peers
add allowed-address=10.10.10.2/32,192.168.0.0/24,192.168.9.0/24,192.168.2.0/24,192.168.15.0/24 comment=\
    "PC Lavoro Ste" endpoint-address=128.116.170.155 endpoint-port=13232 interface=wireguard1 name=StePC \
    persistent-keepalive=25s public-key="GJcFbDDq6weLughCCn1WmSe4/aYlDZ5KLldWhyx2gGQ="
add allowed-address=10.10.10.3/32,192.168.9.0/24 comment="S23 Ste " endpoint-port=13232 interface=wireguard1 name=\
    WgS23Ste persistent-keepalive=25s public-key="M02YwhGC7/ZsKPGO+uc2lI6NCa9S55MLHLHs9oTmjDw="
/ip address
add address=192.168.9.1/24 comment="IP LAN" interface=brLAN network=192.168.9.0
add address=172.20.1.1/24 comment="IP WIFI OSPITI" interface=brOspiti network=172.20.1.0
add address=10.10.10.1/24 comment=Wireguard interface=wireguard1 network=10.10.10.0
add address=192.168.10.1/24 comment="IP LAN GIADA" interface=brGiada network=192.168.10.0
/ip cloud
set ddns-enabled=yes ddns-update-interval=2h
/ip dhcp-client
add comment="DHCP CLIENT DA FWA VODAFONE" default-route-distance=5 interface=vlan1038-dati
/ip dhcp-server lease
add address=192.168.9.149 client-id=1:bc:24:11:8c:a4:64 mac-address=BC:24:11:8C:A4:64 server=dhcpLan
add address=192.168.9.195 client-id=1:2:66:46:2d:df:bb mac-address=02:66:46:2D:DF:BB server=dhcpLan
/ip dhcp-server network
add address=172.20.1.0/24 comment="NET WIFI OSPITI" dns-server=172.20.1.1 gateway=172.20.1.1 ntp-server=172.20.1.1
add address=192.168.9.0/24 comment="DHCP RETE LAN" dns-server=192.168.9.1 gateway=192.168.9.1 ntp-server=\
    192.168.9.1
add address=192.168.10.0/24 comment="DHCP LAN GIADA" dns-server=192.168.10.1 gateway=192.168.10.1 ntp-server=\
    192.168.10.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8,9.9.9.9
/ip firewall address-list
add address=192.168.9.0/24 list=NetLan
add address=192.168.0.0/16 list=NetPrivateLan
add address=10.0.0.0/8 list=NetPrivateLan
add address=172.16.0.0/12 list=NetPrivateLan
add address=100.64.0.0/10 list=NetPrivateLan
add address=172.20.1.0/24 list=NetWifiOspiti
add address=192.168.0.176 list=HostPcLavoro
add address=192.168.10.0/24 list=NetLanGiada
/ip firewall filter
add action=fasttrack-connection chain=forward comment="FWD - fasttrack - established,related" connection-state=\
    established,related hw-offload=yes
add action=accept chain=forward comment="FWD - ACCETTA - established,related" connection-state=established,related
add action=accept chain=input comment="IN - ACCETTA established, related" connection-state=established,related
add action=accept chain=input comment="IN - ACCETTA ICMP" protocol=icmp
add action=accept chain=input comment="IN - ACCETTA LAN -> DNS" dst-port=53 in-interface-list=LAN protocol=udp
add action=accept chain=input comment="IN - ACCETTA LAN -> NTP" dst-port=123 in-interface-list=LAN protocol=udp
add action=accept chain=input comment="IN - ACCETTA LAN -> WINBOX 8291 " dst-port=8291 in-interface-list=LAN \
    protocol=tcp
add action=accept chain=input comment="IN - ACCETTA LAN -> SSH 22 " dst-port=22 in-interface-list=LAN protocol=tcp
add action=accept chain=input comment="IN - ACCETTA PORTA WIREGUARD" dst-port=13232 protocol=udp
add action=accept chain=input comment="IN - ACCETTA LAN GIADA -->  ICMP" in-interface-list=LAN_GIADA protocol=icmp \
    src-address-list=NetLanGiada
add action=accept chain=input comment="IN - ACCETTA LAN GIADA  -->  DNS" dst-port=53 in-interface-list=LAN_GIADA \
    protocol=udp src-address-list=NetLanGiada
add action=accept chain=input comment="IN - ACCETTA LAN GIADA  -->  NTP" dst-port=123 in-interface-list=LAN_GIADA \
    protocol=udp src-address-list=NetLanGiada
add action=accept chain=input comment="IN - ACCEPT - WIFI-OSPITI -->  ICMP" in-interface-list=OSPITI protocol=icmp \
    src-address-list=NetWifiOspiti
add action=accept chain=input comment="IN - ACCEPT - WIFI-OSPITI  -->  DNS" dst-port=53 in-interface-list=OSPITI \
    protocol=udp src-address-list=NetWifiOspiti
add action=accept chain=input comment="IN - ACCEPT - WIFI-OSPITI  -->  NTP" dst-port=123 in-interface-list=OSPITI \
    protocol=udp src-address-list=NetWifiOspiti
add action=accept chain=input comment="IN - ACCETTA WIREGUARD" in-interface-list=Wg1
add action=drop chain=input comment="IN - DROP RESTO DELLE CONNESSIONI" log=yes log-prefix="[IN-DROP]"
add action=drop chain=forward comment="FWD - DROP invalid" connection-state=invalid
add action=accept chain=forward comment="FWD - ACCETTA - LAN -> INTERNET TRAMITE FWA VODAFONE" in-interface-list=\
    LAN out-interface-list=WAN src-address-list=NetLan
add action=accept chain=forward comment="FWD - ACCEPT - LAN GIADA -->  WAN" in-interface-list=LAN_GIADA \
    out-interface-list=WAN src-address-list=NetLanGiada
add action=accept chain=forward comment="FWD - ACCEPT - WIFI OSPITI -->  WAN" in-interface-list=OSPITI \
    out-interface-list=WAN src-address-list=NetWifiOspiti
add action=accept chain=forward comment="FWD - ACCEPT - WIREGUARD --> LAN" dst-address-list=NetLan \
    in-interface-list=Wg1 out-interface-list=LAN src-address-list=""
add action=drop chain=forward comment="FWD - DROP ALTRE CONNESSIONI NON NATTATE" connection-nat-state=!dstnat log=\
    yes log-prefix="[FWD-DROP]"
/ip firewall nat
add action=masquerade chain=srcnat comment="SRCNAT - MASQ - NAVIGAZIONE DA LAN SU WAN FWA VODAFONE " \
    out-interface-list=WAN
add action=masquerade chain=srcnat comment="SRCNAT - MASQUERADE - ----->  INTERNET" out-interface-list=WAN
add action=masquerade chain=srcnat src-address=10.10.10.0/24
add action=dst-nat chain=dstnat dst-port=443 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
    to-ports=443
add action=dst-nat chain=dstnat dst-port=9000 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
    to-ports=9000
add action=dst-nat chain=dstnat dst-port=9003 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
    to-ports=9003
add action=dst-nat chain=dstnat dst-port=9002 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
    to-ports=9002
add action=dst-nat chain=dstnat dst-port=9001 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
    to-ports=9001
add action=dst-nat chain=dstnat dst-port=80 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
    to-ports=80
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip route
add comment="ROUTE IP LAVORO TRAMITE TUNNEL WIREGUARD" disabled=no distance=1 dst-address=192.168.0.176/32 \
    gateway=wireguard1 routing-table=main suppress-hw-offload=no
add disabled=no dst-address=192.168.0.0/24 gateway=wireguard1 routing-table=main suppress-hw-offload=no
/ip service
set ftp disabled=yes
set telnet disabled=yes
set www disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ip ssh
set strong-crypto=yes
/system clock
set time-zone-name=Europe/Rome
/system identity
set name=FIREWALL-MIKROTIK
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp server
set enabled=yes manycast=yes
/system ntp client servers
add address=it.pool.ntp.org
add address=ntp1.inrim.it
/system routerboard settings
set enter-setup-on=delete-key
/tool bandwidth-server
set enabled=no
/tool graphing interface
add
/tool graphing resource
add
 
Hai due interfacce nel bridge wan, eth1 e eth2, non è che l'IP pubblico dell'FWA se lo prende il dispositivo nella porta 2?

Non so cosa è quel device, ma se non ti è indispensabile, secondo me ti conviene mettere la vlan 1038 su ether1, togli ether1 dal bridge brWAN e vedi se il problema persiste
 
Non so cosa è quel device, ma se non ti è indispensabile, secondo me ti conviene mettere la vlan 1038 su ether1, togli ether1 dal bridge brWAN e vedi se il problema persiste
Ether2 non è collegato a niente ... doveva essere per un futuro voip quando avrei capito come impostarlo ma tanto non uso il telefono ...
quindi devo togliere ether2 dal bridge o ether1?
 
Pubblicità
Pubblicità
Indietro
Top