A
A
Alexander Zakharov2021-01-07 21:22:30
linux
Alexander Zakharov, 2021-01-07 21:22:30

How to set up routing on a PPTP server?

Hello.
We have:
1. Server on VPS with white IP.
- Ubuntu 18.04 system
- a VPN server (PPTP)
is raised on it - the following is written in the config:

localip 10.1.0.1
remoteip 10.1.0.2-50

2. When connecting each client, an interface is created, such as:
ppp1: flags=4305 mtu 1492
inet 10.1.0.1 netmask 255.255.255.255 destination 10.1.0.10
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 11 bytes 352 (352.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 385 bytes 35016 (35.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Here the first question appears:
How to make sure that for each client a new /32 subnet is not created, but there is a common subnet, where 10.1.0.1 (the internal address of the VPN server) and all clients are on the same /24 subnet? Moreover, as I see it, the server (10.1.0.1) should be in the role of gateway.
The essence of the task is as follows:
On the server, clients are registered in /etc/ppp/chap-secrets:
- one of them "user" is any device (PC, phone, etc.) from which access to all other client networks will be available.
- other clients - routers in different parts of the world with different internal subnets (192.168.1.0/24; 192.168.77.0/24; 192.168.100.0/24, etc.).
Accordingly, "user" must have access to any of these local networks.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2021-01-07
@ky0

You took a not particularly suitable type of vpn for this. Which, in fact, even hints at its name.

S
Sanes, 2021-01-07
@Sanes

remoteip 10.1.0.2-254
iptables -I INPUT -s 10.1.0.0/24 -i ppp0 -j ACCEPT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question