Community discussions

MikroTik App
 
Lonecrow
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Mon Dec 24, 2007 4:58 am

VPN between two mikrotiks with only 1 subnet being passed

Fri Jun 04, 2010 6:04 pm

I'm just testing something for future use and I can't seem to get it going.

Router A = Office Router LAN 192.168.1.x
Router B = Remote Location Router LAN 10.99.x.x

Router A = pptp client 10.100.1.2
Router B = pptp server 10.100.1.1

I'm trying to set this up so that ALL TRAFFIC goes out our default gateway EXCEPT traffic destined for 10.99.x.x in which case I want that traffic forwarded through the VPN to the other location.


I CAN contact 10.99.x.x from both routers BUT NOT from inside the office LAN (192.168.1.x)


What am I doing wrong?
 
Lonecrow
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Mon Dec 24, 2007 4:58 am

Re: VPN between two mikrotiks with only 1 subnet being passe

Fri Jun 04, 2010 6:59 pm

I discovered an easier way using ip tunnels and added a route and it seems to be working now..

I just wonder how secure these ip tunnels are..
 
Lonecrow
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Mon Dec 24, 2007 4:58 am

Re: VPN between two mikrotiks with only 1 subnet being passe

Fri Jun 04, 2010 8:33 pm

I also found out that I should use a VPN and then set up an IP tunnel or an EOIP tunnel. I've tried both via the VPN and I can't contact the other side no matter what from inside the lan of Router A.

The only way i've been able to get it to work is just a straight ip tunnel with no VPN...

Dangit..

Even followed instructions on the site to the letter bridging the interfaces, I've tried multiple variations. Something just doesn't work.
 
vk7zms
Member Candidate
Member Candidate
Posts: 227
Joined: Thu Jun 29, 2006 3:01 am
Location: Hobart, Tasmania
Contact:

Re: VPN between two mikrotiks with only 1 subnet being passe

Sat Jun 05, 2010 2:14 pm

pptp or Eoip should work well - it sounds like you may be missing a static route somewhere. Can you post VPN and routing configuration?
 
Lonecrow
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Mon Dec 24, 2007 4:58 am

Re: VPN between two mikrotiks with only 1 subnet being passe

Wed Jun 09, 2010 10:09 pm

I'll be able to work on it Friday thanks.. I'll post it all then. I took it all apart..

I added a static route on the office side to the other side of the tunnel and it still would not work.

I was able to ping the remote device/subnet from the office side's mikrotik, but not from inside the offices LAN.

I could if I just used IP tunnels.. but not VPN and IP Tunnel together nor with VPN and EOIP together either. I'm using pptp VPN's.. :)

Thanks for offering help I'll post configs on Friday.
 
tricer
newbie
Posts: 48
Joined: Tue May 25, 2010 9:49 pm
Location: Maryland, USA

Re: VPN between two mikrotiks with only 1 subnet being passe

Wed Jun 09, 2010 10:41 pm

I would use IPIP tunnels with IPSEC encryption

here is a great how to from greg sowell.
http://gregsowell.com/wp-content/upload ... k-vpn1.pdf
look at pages 48 - 52
 
Lonecrow
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Mon Dec 24, 2007 4:58 am

Re: VPN between two mikrotiks with only 1 subnet being passe

Thu Jun 10, 2010 11:41 pm

Thanks I'll check that out tomorrow. I love mikrotik it has sooo many ways of doing things..
 
blake
Member
Member
Posts: 426
Joined: Mon May 31, 2010 10:46 pm
Location: Arizona

Re: VPN between two mikrotiks with only 1 subnet being passe

Fri Jun 11, 2010 5:28 am

Why would you not use a simple IPSec connection in tunnel mode?

http://wiki.mikrotik.com/wiki/Manual:IP ... Sec_Tunnel
 
Lonecrow
Member Candidate
Member Candidate
Topic Author
Posts: 136
Joined: Mon Dec 24, 2007 4:58 am

Re: VPN between two mikrotiks with only 1 subnet being passe

Fri Jun 11, 2010 5:19 pm

I think I figured it out... I had NAT on one router and it was not working, so I think I would have had to add some firewall rules but it would have made it impossible to do. So I had to switch the VPN's ip's to a 172.x.x.x subnet and test it on a router that didn't have NAT enabled on that subnet. Bizzare because it should keep track of the outgoing sessions. I will just have to make sure no NAT is involved or I'll have to add some firewall rules specific to those subnets. Problem is that I couldn't break up that 10.x.x.x because I already was natting all 10.0.0.0/8 ..
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: VPN between two mikrotiks with only 1 subnet being passe

Fri Jun 11, 2010 5:24 pm

You can override NAT by accepting more specifically higher up the chain. Accepting in NAT is a null action, but as long as you're not passing through does qualify as a first match and processing stops.
Assuming you're NAT'ing 10/8 but want to not NAT it when 10.1/16 goes to 192.168.1.0/24 that would like below:
/ip firewall nat
add chain=src-nat out-interface=WAN src-address=10.1.0.0/16 dst-address=192.168.1.0/24 action=accept passthrough=no
add chain=src-nat out-interface=WAN src-address=10.0.0.0/8  action=masquerade

Who is online

Users browsing this forum: AndreKR, Bing [Bot], CHUPAPEE, li77616211 and 194 guests