Requirements: The customer provides a PPTP Server to access their network, so that they can access their server, how to log in to the customer's PPTP server using the pptp-client of the RouterOS router, and then access the 192.168.81.0/24 network segment to take the pptp-client interface, access other networks or the local default network.
The network topology diagram is as follows:
PPTP connection
GUI operation, ininterfaces -> interface -> add -> PPTP Client, as shown in the figure below:
where dial-on-demand=yes saves resources and avoids maintaining useless connections for long periods of time. That isConnect on demand, connect only when you need it, and disconnect when it's idle。
You can also check the interface status through the command, which is as follows:
As shown below:
Static routing
Add a static route to let 192.168.81.0/24 go through the PPTP tunnel, and add a configuration to the IP-> Routers, as shown in the following figure:
Fill in the name of the PPTP interface you just created as the next hop, and the destination address is the CIDR block address.
Firewall NAT rules
If you want the devices under the router to be able to access the remote 192.168.81.0/24 server via PPTP, you also need to add the MASQUERADE settings to the IP -> Firewall -> NAT configuration as follows:
At this point, the configuration through the interface has been completed.
Command-line operations
The operation through the interface is more cumbersome, and it can be quickly configured through the command line, and the command line configuration is as follows:
Reference:The hyperlink login is visible. |