Mainos / Advertisement:

Difference between revisions of "Mikrotik gre"

From Taisto
Jump to navigation Jump to search
Line 23: Line 23:
  
  
Site 1:
+
==== Site 1: ====
 +
 
 
  /interface gre add name=gresämpylä remote-address=10.0.0.2 local-address=10.0.0.1  
 
  /interface gre add name=gresämpylä remote-address=10.0.0.2 local-address=10.0.0.1  
  
Line 30: Line 31:
 
  /ip route add dst-address=192.168.10.0/24 gateway=10.100.100.2
 
  /ip route add dst-address=192.168.10.0/24 gateway=10.100.100.2
  
Site 2:
+
 
 +
==== Site 2: ====
 +
 
 
  /interface gre add name=gresämpylä2 remote-address=10.0.0.1 local-address=10.0.0.2
 
  /interface gre add name=gresämpylä2 remote-address=10.0.0.1 local-address=10.0.0.2
  
Line 40: Line 43:
  
  
 +
=== Ipsec vielä ===
 +
 +
Ipsec on kätevä lisä gre:lle
 +
 +
Site 1:
 +
 +
/ip ipsec peer
 +
  add address=10.100.100.1/24 port=500 auth-method=pre-shared-key
 +
  secret=Qwerty1
 +
 +
/ip ipsec policy
 +
  add src-address=192.168.200.0/24 src-port=any dst-address=192.168.100.0/24 dst-port=any sa-src-address=10.100.100.1 sa-dst-address=10.100.100.2 tunnel=yes action=encrypt proposal=default
 +
 +
 +
Site 2:
 +
 +
/ip ipsec peer
 +
  add address=10.100.100.2/24 port=500 auth-method=pre-shared-key
 +
  secret=Qwerty1
  
 +
/ip ipsec policy
 +
  add src-address=192.168.100.0/24 src-port=any dst-address=192.168.200.0/24 dst-port=any sa-src-address=10.100.100.2 sa-dst-address=10.100.100.1 tunnel=yes action=encrypt proposal=default
  
 
Kirjoitus gre:stä
 
Kirjoitus gre:stä
  
 
http://www.tagesson.net/wordpress/2011/03/16/the-beauty-of-gre/
 
http://www.tagesson.net/wordpress/2011/03/16/the-beauty-of-gre/

Revision as of 11:27, 27 February 2015

Gre tunneli on erittäin helppo tehdä mikrotikillä.

Yksinkertaisesti vaan tehdään interfacet molemmille reitittimille ja niihin laitetaan tunneli ip:t.

Sitten vielä reitit kuntoon ja tadaa


Site 1: julkinen ip 10.0.0.1/24

sisäverkko 192.168.0.0/24

tunnelin ip 10.100.100.1


Site 2: julkinen ip 10.0.0.2/24

sisäverkko 192.168.10.0/24

tunnelin ip 10.100.100.2


Site 1:

/interface gre add name=gresämpylä remote-address=10.0.0.2 local-address=10.0.0.1 
/ip address add address 10.100.100.1 interface=gresämpylä
/ip route add dst-address=192.168.10.0/24 gateway=10.100.100.2


Site 2:

/interface gre add name=gresämpylä2 remote-address=10.0.0.1 local-address=10.0.0.2
/ip address add address 10.100.100.2 interface=gresämpylä2
/ip route add dst-address=192.168.0.0/24 gateway=10.100.100.1



Ipsec vielä

Ipsec on kätevä lisä gre:lle

Site 1:
/ip ipsec peer
 add address=10.100.100.1/24 port=500 auth-method=pre-shared-key
 secret=Qwerty1
/ip ipsec policy
 add src-address=192.168.200.0/24 src-port=any dst-address=192.168.100.0/24 dst-port=any sa-src-address=10.100.100.1 sa-dst-address=10.100.100.2 tunnel=yes action=encrypt proposal=default


Site 2:
/ip ipsec peer
 add address=10.100.100.2/24 port=500 auth-method=pre-shared-key
 secret=Qwerty1
/ip ipsec policy
 add src-address=192.168.100.0/24 src-port=any dst-address=192.168.200.0/24 dst-port=any sa-src-address=10.100.100.2 sa-dst-address=10.100.100.1 tunnel=yes action=encrypt proposal=default

Kirjoitus gre:stä

http://www.tagesson.net/wordpress/2011/03/16/the-beauty-of-gre/

Mainos / Advertisement: