Community discussions

MikroTik App
 
gradash
newbie
Topic Author
Posts: 33
Joined: Mon Apr 20, 2015 11:44 am

Mikrotik PPTP config.

Thu May 21, 2015 11:57 am

Hi, i have CCR and need to configure PPTP access from remote pc.
All configured as written in many manuals but connection working only from lan
I have missed some firewall rule or NAT ? what i need to do to connect to PPTP from outter internet ?

export compact
# may/21/2015 11:48:36 by RouterOS 6.27

/interface bridge
add name=LANWAN
/interface ethernet
set [ find default-name=ether1 ] comment=ISP1
set [ find default-name=ether2 ] comment=ISP2
set [ find default-name=ether3 ] comment=LAN
set [ find default-name=ether4 ] comment=WAN
/ip neighbor discovery
set ether1 comment=ISP1
set ether2 comment=ISP2
set ether3 comment=LAN
set ether4 comment=WAN
/ip pool
add name=dhcp ranges=192.168.30.50-192.168.30.250
/ip dhcp-server
add address-pool=dhcp disabled=no interface=LANWAN lease-time=1d name=DHCP
/port
set 0 name=serial0
set 1 name=serial1
/ppp profile
add local-address=192.168.30.1 name=pptp remote-address=192.168.30.40
/snmp community
add addresses=0.0.0.0/0 name=nemo
/interface bridge port
add bridge=LANWAN interface=ether3
add bridge=LANWAN interface=ether4
/interface l2tp-server server
set ipsec-secret=xxxxxxxxxxxxxx use-ipsec=yes
/interface pptp-server server
set default-profile=pptp enabled=yes
/ip address
add address=xxxxxxxxxxxxxx/29 interface=ether1 network=xxxxxxxxxxxxxx
add address=xxxxxxxxxxxxxx/30 interface=ether2 network=xxxxxxxxxxxxxx
add address=192.168.30.1/23 interface=LANWAN network=192.168.30.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-server network
add address=192.168.30.0/23 dns-server=xxxxxxxxxxxxxx gateway=192.168.30.1
/ip dns
set allow-remote-requests=yes servers=xxxxxxxxxxxxxx
/ip firewall address-list
add address=192.168.4.0/22 list=LocalNet
add address=192.168.30.0/23 list=LocalNet
add address=172.30.10.0/24 list=LocalNet
add address=192.168.0.0/23 list=LocalNet
add address=172.30.200.0/24 list=LocalNet
/ip firewall filter
add chain=input comment="Allow gre" protocol=gre
add chain=input comment="Allow port 1723" dst-port=1723 protocol=tcp
add chain=forward comment="Allow all subnets" dst-address-list=LocalNet \
    src-address-list=LocalNet
add chain=input comment="Allow ping" protocol=icmp
add chain=forward protocol=icmp
add chain=input comment="Allow estabilished" connection-state=established
add chain=forward connection-state=established
add chain=input comment="Allow related" connection-state=related
add chain=forward connection-state=related
add chain=input comment="Allow UDP" protocol=udp
add chain=forward protocol=udp
add action=drop chain=input comment="Drop invalid" connection-state=invalid
add action=drop chain=forward connection-state=invalid
/ip firewall nat
add action=masquerade chain=srcnat comment=\
    "Masquerade out traffic ISP1" out-interface=ether1
add action=masquerade chain=srcnat comment="ISP2" \
    out-interface=ether2
add action=netmap chain=dstnat comment=\
    "NAT to web server at Web PC" in-interface=all-ethernet \
    protocol=tcp to-addresses=192.168.30.121 to-ports=80
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
/ip route
add check-gateway=ping comment="ISP1 Gateway" distance=1 gateway=\
    xxxxxxxxxxxxxx
add check-gateway=ping comment="ISP2 Gateway" distance=2 gateway=\
    xxxxxxxxxxxxxx
add comment="AMS1" distance=1 dst-address=172.30.10.0/23 gateway=\
    192.168.30.31
add comment="AMS2" distance=1 dst-address=172.30.200.0/24 gateway=\
    192.168.30.31
add comment="OFFICE1" distance=1 dst-address=192.168.0.0/23 gateway=\
    192.168.30.31
add comment="OFFICE2" distance=1 dst-address=192.168.4.0/22 gateway=\
    192.168.30.31
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
set www-ssl disabled=no
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=LANWAN type=internal
add interface=ether1 type=external
add interface=ether2 type=external
/ppp profile
set 2 local-address=1.89.168.192 remote-address=*3
/ppp secret
add local-address=192.168.30.1 name=vpnadm password=xxxxxxxxxxxxxx profile=pptp \
    remote-address=192.168.30.42 service=pptp

 
gradash
newbie
Topic Author
Posts: 33
Joined: Mon Apr 20, 2015 11:44 am

Re: Mikrotik PPTP config.

Fri May 22, 2015 2:17 pm

maybe i need some NAT rule ? or route ? help pls
 
gradash
newbie
Topic Author
Posts: 33
Joined: Mon Apr 20, 2015 11:44 am

Re: Mikrotik PPTP config.

Fri May 22, 2015 2:45 pm

in Torch when trying to connect i see this, but only two seconds... then dissapears
Untitled.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
MadEngineer
Member Candidate
Member Candidate
Posts: 141
Joined: Mon May 02, 2011 10:47 am
Location: New Zealand

Re: Mikrotik PPTP config.

Sat May 23, 2015 10:28 am

http://wiki.mikrotik.com/wiki/Manual:Interface/PPTP
PPTP traffic uses TCP port 1723 and IP protocol GRE (Generic Routing Encapsulation, IP protocol ID 47), as assigned by the Internet Assigned Numbers Authority (IANA). PPTP can be used with most firewalls and routers by enabling traffic destined for TCP port 1723 and protocol 47 traffic to be routed through the firewall or router.
 
gradash
newbie
Topic Author
Posts: 33
Joined: Mon Apr 20, 2015 11:44 am

Re: Mikrotik PPTP config.

Sun May 24, 2015 8:56 pm

TCP port 1723 and IP protocol GRE - allowed.
 
gradash
newbie
Topic Author
Posts: 33
Joined: Mon Apr 20, 2015 11:44 am

Re: Mikrotik PPTP config.

Tue May 26, 2015 11:56 am

can it be because this turned off ?
Capture.PNG
You do not have the required permissions to view the files attached to this post.
 
User avatar
MadEngineer
Member Candidate
Member Candidate
Posts: 141
Joined: Mon May 02, 2011 10:47 am
Location: New Zealand

Re: Mikrotik PPTP config.

Tue May 26, 2015 12:16 pm

^ No.

What are you seeing in your log when you try to connect? Are any of the drop firewall rules generating traffic (packets/bytes) when you try to connect?

Also I suggest you don't use PPTP and instead follow this guide:
https://www.nasa-security.net/mikrotik/ ... ith-ipsec/
 
gradash
newbie
Topic Author
Posts: 33
Joined: Mon Apr 20, 2015 11:44 am

Re: Mikrotik PPTP config.

Tue May 26, 2015 12:21 pm

nothing in log... just appears\disappears connection to pptp port in Torch (previous screenshot)

there is log settings and log part when connecting

log.PNG
log2.PNG
You do not have the required permissions to view the files attached to this post.
 
User avatar
MadEngineer
Member Candidate
Member Candidate
Posts: 141
Joined: Mon May 02, 2011 10:47 am
Location: New Zealand

Re: Mikrotik PPTP config.

Tue May 26, 2015 12:48 pm

Any increasing counts on your drop firewall rules while you try to connect? and I don't see any accept rules? Is that export correct?
 
gradash
newbie
Topic Author
Posts: 33
Joined: Mon Apr 20, 2015 11:44 am

Re: Mikrotik PPTP config.

Tue May 26, 2015 1:08 pm

Also I suggest you don't use PPTP and instead follow this guide:
https://www.nasa-security.net/mikrotik/ ... ith-ipsec/
hmm.... L2TP working.... but ok, good
now just NEED to know what about PPTP :)
 
gradash
newbie
Topic Author
Posts: 33
Joined: Mon Apr 20, 2015 11:44 am

Re: Mikrotik PPTP config.

Tue May 26, 2015 1:30 pm

Any increasing counts on your drop firewall rules while you try to connect? and I don't see any accept rules? Is that export correct?
i tryed many firewall configs... now i have first 3 rules accept all input,output,forward
 
User avatar
MadEngineer
Member Candidate
Member Candidate
Posts: 141
Joined: Mon May 02, 2011 10:47 am
Location: New Zealand

Re: Mikrotik PPTP config.

Tue May 26, 2015 2:28 pm

Input is for data sent to the router
Output is for data generated by the router
Forward is for data generated by devices communicating through the router.

For your pptp service you only need to accept input for pptp traffic, which you have claimed to have done already - this will be enough.

PPTP is not secure anymore. Why must you use it if you have IPsec working?