Indice   FAQ  
Iscriviti  Login
Indice RouterOS RouterOS

Due router mikrotik

Tutto su questo sistema operativo linux based - Configurazioni, dubbi, problematiche &....

Re: Due router mikrotik

Messaggioda figheras » lun 4 nov 2013, 20:58

E da cmd sul pc??
Poi un altra domanda ma quel 192.168.99.70 ha la porta 60000 in ascolto???
Non è che fai confusione con il nat??Con la VPN nn hai bisogno di dst-NAT lo raggiungi direttamente tramite ip privato, giusto per precisare!
Siamo tutti ignoranti. Ma non tutti ignoriamo le stesse cose! - Einstein -
Avatar utente
figheras
Staff rosIT
Staff rosIT
 
Messaggi: 1218
Iscritto il: sab 19 set 2009, 20:09
Uso routerOS dalla Versione: v2.9.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE
Altre certificazioni: Cisco CCNA, KalliopePBX
Preferred Training Centre: Grifonline

Re: Due router mikrotik

Messaggioda kris89 » lun 4 nov 2013, 21:28

Ok, quindi se la vpn funzionasse aprendo il browser in sede A sarebbe come farlo dalla sede B, giusto ?

192.168.99.70 ha la porta 60000 in ascolto ed è collegato alla LAN del routerOS client 192.168.99.1...

Da cmd ottengo richiesta scaduta... Ma non ci saranno di default dei limiti a livello di firewall nel routerOS che limitano le mie azioni ?
kris89
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 34
Iscritto il: lun 4 nov 2013, 13:50

Re: Due router mikrotik

Messaggioda figheras » lun 4 nov 2013, 21:33

Fai un export compact di entrambi le sedi
Siamo tutti ignoranti. Ma non tutti ignoriamo le stesse cose! - Einstein -
Avatar utente
figheras
Staff rosIT
Staff rosIT
 
Messaggi: 1218
Iscritto il: sab 19 set 2009, 20:09
Uso routerOS dalla Versione: v2.9.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE
Altre certificazioni: Cisco CCNA, KalliopePBX
Preferred Training Centre: Grifonline

Re: Due router mikrotik

Messaggioda kris89 » lun 4 nov 2013, 21:41

Sede B ( vpn client )
Codice: Seleziona tutto
# jan/02/1970 08:59:45 by RouterOS 5.24
# software id = WIB2-8TZX
#
/interface ethernet
set 0 arp=proxy-arp name=ether1-gateway
set 1 arp=proxy-arp name=ether2-master-local
set 2 master-port=ether2-master-local name=ether3-slave-local
set 3 master-port=ether2-master-local name=ether4-slave-local
set 4 master-port=ether2-master-local name=ether5-slave-local
/interface pptp-client
add add-default-route=yes connect-to=79.39.191.166 disabled=no name=pptp-out1 \
    password=user1 user=user1
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=kris89 ranges=192.168.99.100-192.168.99.254
/ip dhcp-server
add address-pool=default-dhcp interface=ether2-master-local name=default
add address-pool=kris89 disabled=no interface=ether2-master-local name=kris89
/ip address
add address=192.168.88.1/24 comment="default configuration" disabled=yes \
    interface=ether2-master-local
add address=192.168.99.1/24 comment=kris89 interface=ether2-master-local
/ip dhcp-client
add comment="default configuration" disabled=no interface=ether1-gateway
/ip dhcp-server network
add address=192.168.88.0/24 comment="default configuration" dns-server=\
    192.168.88.1 gateway=192.168.88.1
add address=192.168.99.0/24 comment=kris89 dns-server=192.168.99.1 gateway=\
    192.168.99.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=established
add chain=input comment="default configuration" connection-state=related
add chain=input comment="default configuration" in-interface=ether1-gateway
add chain=input in-interface=pptp-out1 protocol=tcp src-port=1723
add chain=input in-interface=pptp-out1 protocol=gre
add chain=forward in-interface=pptp-out1 out-interface=pptp-out1
add chain=forward out-interface=pptp-out1 protocol=tcp src-address=\
    192.168.99.70 src-port=60000
add chain=output out-interface=pptp-out1 protocol=tcp src-address=\
    192.168.99.1 src-port=80
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1-gateway
/ip neighbor discovery
set ether1-gateway disabled=yes
/ip route
add distance=1 dst-address=192.168.88.0/32 gateway=10.10.10.10
add distance=1 dst-address=192.168.99.70/32 gateway=pptp-out1
/tool mac-server
add disabled=no interface=ether2-master-local
add disabled=no interface=ether3-slave-local
add disabled=no interface=ether4-slave-local
add disabled=no interface=ether5-slave-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local




Sede A ( vpn server )
Codice: Seleziona tutto
# jan/03/1970 02:54:50 by RouterOS 5.24
# software id = XIPV-DAYT
#
/interface ethernet
set 0 arp=proxy-arp name=ether1-gateway
set 1 arp=proxy-arp name=ether2-master-local
set 2 master-port=ether2-master-local name=ether3-slave-local
set 3 master-port=ether2-master-local name=ether4-slave-local
set 4 master-port=ether2-master-local name=ether5-slave-local
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=ether2-master-local name=\
    default
/ppp profile
add local-address=10.10.10.10 name=pptp use-encryption=yes
/interface pptp-server server
set authentication=pap,chap,mschap1,mschap2 default-profile=pptp enabled=yes
/ip address
add address=192.168.88.1/24 comment="default configuration" interface=\
    ether2-master-local
/ip dhcp-client
add comment="default configuration" disabled=no interface=ether1-gateway
/ip dhcp-server network
add address=192.168.88.0/24 comment="default configuration" dns-server=\
    192.168.88.1 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=established
add chain=input comment="default configuration" connection-state=related
add chain=input comment="default configuration" in-interface=ether1-gateway
add chain=forward comment=vpn dst-port=1723 out-interface=ether1-gateway \
    protocol=tcp src-port=1723
add chain=output out-interface=ether1-gateway protocol=gre
add chain=forward in-interface="(unknown)" out-interface="(unknown)"
add chain=output out-interface="(unknown)" protocol=tcp src-address=\
    192.168.88.1 src-port=80
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether1-gateway
add chain=dstnat dst-address=192.168.88.100 dst-port=20000 in-interface=\
    ether1-gateway protocol=tcp src-port=20000
/ip neighbor discovery
set ether1-gateway disabled=yes
/ip route
add distance=1 dst-address=192.168.99.0/32 gateway="(unknown)"
/ppp secret
add local-address=10.10.10.10 name=user1 password=user1 profile=pptp \
    remote-address=10.10.10.100 service=pptp
/tool mac-server
add disabled=no interface=ether2-master-local
add disabled=no interface=ether3-slave-local
add disabled=no interface=ether4-slave-local
add disabled=no interface=ether5-slave-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local


PS ho lasciato un po' di tentativi che ho fatto....
kris89
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 34
Iscritto il: lun 4 nov 2013, 13:50

Re: Due router mikrotik

Messaggioda figheras » mar 5 nov 2013, 10:11

add distance=1 dst-address=192.168.99.0/32 gateway="(unknown)"

Questa rotta (lato server) è errata!

Sostituisci con :
Codice: Seleziona tutto
add distance=1 dst-address=192.168.99.0/24 gateway="10.10.10.100"

Verfica e fammi sapere
Siamo tutti ignoranti. Ma non tutti ignoriamo le stesse cose! - Einstein -
Avatar utente
figheras
Staff rosIT
Staff rosIT
 
Messaggi: 1218
Iscritto il: sab 19 set 2009, 20:09
Uso routerOS dalla Versione: v2.9.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE
Altre certificazioni: Cisco CCNA, KalliopePBX
Preferred Training Centre: Grifonline

Re: Due router mikrotik

Messaggioda kris89 » mar 5 nov 2013, 11:39

Codice: Seleziona tutto
add distance=1 dst-address=192.168.99.0/24 gateway="10.10.10.100"


[ahah] ma come ho fatto a sbagliare proprio la cosa più semplice ??!!

Sostituito ed effettivamente sono cambiate molte cose, però tra i firewall ho dovuto aggiungere ( pensavo non servisse altro ) :

Codice: Seleziona tutto
add chain=forward out-interface=<pptp-user1>


Codice: Seleziona tutto
add chain=forward out-interface=<pptp-out1>


adesso in sede A ( vpn server ) non mi resta che inoltrare la porta in ascolto verso LAN del Router Provider e poi da quello verso WAN... in questo modo va bene ? :

Codice: Seleziona tutto
/ip firewall nat add chain=dstnat dst-address=192.168.1.250 protocol=tcp dst-port=60000 \
    action=dst-nat to-addresses=192.168.99.70 to-ports=60000



Codice: Seleziona tutto
192.168.99.70:60000<--R2+RProvider-->tunnelvpn<--R1+RProvider-->IPinternet:60000


Grazie per il tempo e la pazienza.
kris89
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 34
Iscritto il: lun 4 nov 2013, 13:50

Re: Due router mikrotik

Messaggioda figheras » mar 5 nov 2013, 12:41

adesso in sede A ( vpn server ) non mi resta che inoltrare la porta in ascolto verso LAN del Router Provider e poi da quello verso WAN... in questo modo va bene ? :

Scusa e che l'hai routata a fare quella subnet??
192.168.99.0/24

Anche se è sotto nat puoi raggiungerla tranquillamente con quella rotta.
Siamo tutti ignoranti. Ma non tutti ignoriamo le stesse cose! - Einstein -
Avatar utente
figheras
Staff rosIT
Staff rosIT
 
Messaggi: 1218
Iscritto il: sab 19 set 2009, 20:09
Uso routerOS dalla Versione: v2.9.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE
Altre certificazioni: Cisco CCNA, KalliopePBX
Preferred Training Centre: Grifonline

Re: Due router mikrotik

Messaggioda kris89 » mar 5 nov 2013, 12:51

Dal routerOS ( server ) riesco a vederlo, ma dal router provider no...
In pratica il mio routerOS ( server ) è collegato alla LAN del router provider...
eth1 routerOS ha un indirizzo privato 192.168.1.250 che viene dal router provider 192.168.1.1 ..lan routerOS = 192.168.88.x....
Dovrei adesso inoltrare quello che ricevo dalla sede B al router provider sede A così da poterlo inoltrare in internet, ma sto provando da un po' e non saprei proprio come fare...
kris89
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 34
Iscritto il: lun 4 nov 2013, 13:50

Re: Due router mikrotik

Messaggioda figheras » mar 5 nov 2013, 13:05

Aggiungi una rotta sul router del provider:
Codice: Seleziona tutto
add dst-address=192.168.99.0/24 gateway="192.168.1.250"

Spero di non aver sbagliato a capire...oramai mi sono perso!!!! :zzz:
Siamo tutti ignoranti. Ma non tutti ignoriamo le stesse cose! - Einstein -
Avatar utente
figheras
Staff rosIT
Staff rosIT
 
Messaggi: 1218
Iscritto il: sab 19 set 2009, 20:09
Uso routerOS dalla Versione: v2.9.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE
Altre certificazioni: Cisco CCNA, KalliopePBX
Preferred Training Centre: Grifonline

Re: Due router mikrotik

Messaggioda kris89 » mar 5 nov 2013, 13:25

non posso, perchè il router del provider non prevede route..... per questo volevo fare forwanding verso l'indirizzo privato... ma non riesco ad inoltrare da 192.168.99.70:60000 a 192.168.1.250:60000 (lan provider/gateway eth1 mikrotik vpn server )

Codice: Seleziona tutto
192.168.99.70:60000--192.168.99.1----170.16.22.11----150.ll.kk.bb----tunnel----192.168.88.1----192.168.1.250-----109.rr.zz.ss:60000



come posso fare ?
kris89
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 34
Iscritto il: lun 4 nov 2013, 13:50


PrecedenteProssimo

Torna a RouterOS

Chi c’è in linea

Visitano il forum: Nessuno e 16 ospiti