Community discussions

MikroTik App
 
EHCorp
just joined
Topic Author
Posts: 5
Joined: Tue Aug 30, 2011 12:15 pm

Howto access RouterBoard with PPTP Connection

Wed Aug 31, 2011 9:29 am

Please sirs i need your consultancy in this matter and thanks in advance :), the case is as follows:

1 MT(A) without real ip at home having the range 192.168.10.1/24
1 MT(B) with Real IP on ether1 at work with also ether2 and the range 192.168.100.2/24
MT(B) has PPTP Server configured with the range 192.168.101.2/24
MT(A) has a user PPTP client connected to the MT(B)

From MT(B) i can see that MT(A) is connected and assigned the ip 192.168.101.126, if I ping it from MT(B) new terminal i get a reply but if i ping from a workstation behind MT(B) LAN with the range 192.168.100.0/24 i get no reply, moreover if I connect to telnet from MT(B) I can connect too but I can't from any workstation behind the LAN of MT(B) what is the possible solution so I can access MT(A) on ip 192.168.101.126 from a workstation with IP 192.168.100.27 behin the LAN of MT(B)? Thanks again for helping guys :).
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Howto access RouterBoard with PPTP Connection

Wed Aug 31, 2011 5:03 pm

Do the two routers have routes to the subnets behind each via the PPTP tunnel?

If you don't know post some detail. Start with the output of "/ip address print detail", "/ip route print detail", "/interface print detail", "/ip firewall export", as well as "/interface pptp-server export" and "/interface pptp-client export" from the relevant routers, and an accurate network diagram.
 
EHCorp
just joined
Topic Author
Posts: 5
Joined: Tue Aug 30, 2011 12:15 pm

Re: Howto access RouterBoard with PPTP Connection

Fri Sep 02, 2011 10:59 am

Do the two routers have routes to the subnets behind each via the PPTP tunnel?

If you don't know post some detail. Start with the output of "/ip address print detail", "/ip route print detail", "/interface print detail", "/ip firewall export", as well as "/interface pptp-server export" and "/interface pptp-client export" from the relevant routers, and an accurate network diagram.
/ip address print detail
0 address=192.168.100.2/24 network=192.168.100.0 interface=LAN actual-interface=LAN

1 address=192.168.10.2/28 network=192.168.10.0 interface=LAN actual-interface=LAN

2 address=192.168.2.2/24 network=192.168.2.0 interface=LAN actual-interface=LAN

3 address=xx.xx.xx.x4/29 network=xx.xx.xx.x2 interface=WAN actual-interface=WAN

9 D address=192.168.101.2/32 network=192.168.101.163 interface=<pptp-elie-1> actual-interface=<pptp-elie-1>

10 D address=192.168.101.2/32 network=192.168.101.162 interface=<pptp-elie> actual-interface=<pptp-elie>

14 address=192.168.101.2/24 network=192.168.101.0 interface=WAN actual-interface=WAN

/ip route print detail

0 A S dst-address=0.0.0.0/0 pref-src=xx.xx.xx.x4 gateway=xx.xx.xx.x3 gateway-status=xx.xx.xx.x3 reachable WAN distance=1 scope=30 target-scope=10

1 ADC dst-address=192.168.2.0/24 pref-src=192.168.2.2 gateway=LAN gateway-status=LAN reachable distance=0 scope=10

2 ADC dst-address=192.168.101.0/24 pref-src=192.168.101.2 gateway=WAN gateway-status=WAN reachable distance=0 scope=10

3 ADC dst-address=192.168.101.162/32 pref-src=192.168.101.2 gateway=<pptp-elie> gateway-status=<pptp-elie> reachable distance=0 scope=10

4 ADC dst-address=192.168.101.163/32 pref-src=192.168.101.2 gateway=<pptp-elie-1> gateway-status=<pptp-elie-1> reachable distance=0 scope=10


5 ADC dst-address=xx.xx.xx.x2/29 pref-src=xx.xx.xx.x4 gateway=WAN gateway-status=WAN reachable distance=0 scope=10

/interface pptp-server server
set authentication=pap,chap,mschap1,mschap2 default-profile=VPN-pptp enabled=yes keepalive-timeout=30 max-mru=1460 max-mtu=1460 mrru=disabled

/ip firewall
add action=masquerade chain=srcnat comment="Masquerade Network!" disabled=no out-interface=WAN src-address=192.168.100.0/23

Hope that everything is clear now :), thx again guys.

Concerning the network diagram it is not complicated, both MT are directly connected to internet 1 with public ip and the other with private ip and behind each MT a 24 port switch which all computers are connected to.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Howto access RouterBoard with PPTP Connection

Fri Sep 02, 2011 4:34 pm

a) that's only one router, not both
b) please use
 tags to keep things readable
c) remove the 192.168.101.0/24 address from the WAN interface, that network exists on the tunnel interfaces (which it dynamically does) so that address servers no purpose than to confuse people. You're actually lucky that didn't break your entire Internet connection by applying your masquerade rule via the 192.168.100.2 address.
d) add routes to the LANs behind the PPTP tunnels via the respective next hop through the tunnel
 
EHCorp
just joined
Topic Author
Posts: 5
Joined: Tue Aug 30, 2011 12:15 pm

Re: Howto access RouterBoard with PPTP Connection

Tue Sep 06, 2011 9:24 am

a) that's only one router, not both
b) please use
 tags to keep things readable
c) remove the 192.168.101.0/24 address from the WAN interface, that network exists on the tunnel interfaces (which it dynamically does) so that address servers no purpose than to confuse people. You're actually lucky that didn't break your entire Internet connection by applying your masquerade rule via the 192.168.100.2 address.
d) add routes to the LANs behind the PPTP tunnels via the respective next hop through the tunnel[/quote]

d) add routes to the LANs behind the PPTP tunnels via the respective next hop through the tunnel

What does that mean man? You mean i specify a new GW for the private IP Router in routes with diferrent scope, please can you explain more?
 
EHCorp
just joined
Topic Author
Posts: 5
Joined: Tue Aug 30, 2011 12:15 pm

Re: Howto access RouterBoard with PPTP Connection

Tue Sep 06, 2011 2:02 pm

a) that's only one router, not both
b) please use
 tags to keep things readable
c) remove the 192.168.101.0/24 address from the WAN interface, that network exists on the tunnel interfaces (which it dynamically does) so that address servers no purpose than to confuse people. You're actually lucky that didn't break your entire Internet connection by applying your masquerade rule via the 192.168.100.2 address.
d) add routes to the LANs behind the PPTP tunnels via the respective next hop through the tunnel[/quote]

d) add routes to the LANs behind the PPTP tunnels via the respective next hop through the tunnel

What does that mean man? You mean i specify a new GW for the private IP Router in routes with diferrent scope, please can you explain more?[/quote]
Done fewi thx I fixed my issue after hitting my head in the wall :). I appreciate your coordination and time spent over answering my questions, best regards man.