N
N
NewNeo2022-03-11 21:00:05
linux
NewNeo, 2022-03-11 21:00:05

How to set up routing between ppp* clients of l2tp server and port forwarding?

There is a VDS / VPS server (Debian) with one real IP (conditionally 1.2.3.4). By means of this script , the l2tp server is installed. Several accounts have been created, the connection is working, there is Internet access via VPN, but VPN clients do not see each other. Each client receives an address like 192.168.42.*/32.
Based on the manual , everything should work "out of the box", but it does not work.
I don't quite understand what to look for.
ip route gives the following (ip addresses have been replaced, but I think the meaning is clear)

default via 1.2.3.1 dev eth0 onlink
1.2.3.0/24 dev eth0 proto kernel scope link src 1.2.3.4
192.168.42.30 dev ppp0 proto kernel scope link src 192.168.42.1

iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
f2b-sshd   tcp  --  anywhere             anywhere             multiport dports ssh
DROP       udp  --  anywhere             anywhere             udp dpt:l2f policy match dir in pol none
DROP       all  --  anywhere             anywhere             ctstate INVALID
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     udp  --  anywhere             anywhere             multiport dports isakmp,ipsec-nat-t
ACCEPT     udp  --  anywhere             anywhere             udp dpt:l2f policy match dir in pol ipsec
DROP       udp  --  anywhere             anywhere             udp dpt:l2f

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere             ctstate INVALID
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             192.168.43.0/24      ctstate RELATED,ESTABLISHED
ACCEPT     all  --  192.168.43.0/24      anywhere
ACCEPT     all  --  192.168.43.0/24      anywhere
DROP       all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain f2b-sshd (1 references)
target     prot opt source               destination
REJECT     all  --  112.85.42.73         anywhere             reject-with icmp-port-unreachable
REJECT     all  --  122.194.229.38       anywhere             reject-with icmp-port-unreachable
REJECT     all  --  142.93.43.42         anywhere             reject-with icmp-port-unreachable
RETURN     all  --  anywhere             anywhere


The point of the whole idea is that there is a home mini-server on Linux behind NAT and you need to access it remotely. An l2tp client is configured on it, which maintains a permanent connection to this VPS, on which it receives a static IP 192.168.42.10.
But connecting from a phone or another computer to the VPN, I only have access to 192.168.42.1, but there is no access to 192.168.42.10.

What needs to be done and how (what exactly to register) to get access to it?

PS Also, according to the manual, I tried to forward the port (58846 for Deluge) and it also does not work.
And I'd like to set that up too.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question