R
R
Rustem2020-04-27 19:02:56
linux
Rustem, 2020-04-27 19:02:56

What is preventing the 2nd client from connecting to openvpn via ubuntu server with port forwarding?

There are 2 servers on Ubuntu Server 16.04. 1st server - a router with a white ip, 2nd - as an openvpn server .
The router forwards the port for openvpn using iptables:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 4444 -j DNAT --to-destination 10.77.77.10
iptables -t nat -A POSTROUTING -o eth1 -p tcp --dport 4444 -d 10.77.77.10 -j SNAT --to-source 10.77.77.7:4444
iptables -A FORWARD -i eth0 -o eth1 -p tcp --syn --dport 4444 -m conntrack --ctstate NEW -j ACCEPT


The client is connected, the traffic goes. But the next client does not connect, timeout, the port is busy (?).
A private connection to the openvpn server of several clients is normal, so the problem is in the router (1st server).
I also tried forwarding for the web server, more than 1 connection does not occur.
Therefore, the question is what interferes or is not enough on the router?
Problem with iptables? Or is the number of connections per port configured somewhere?
Please help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2020-04-27
@Markedone

What is this for?!
iptables -t nat -A POSTROUTING -o eth1 -p tcp --dport 4444 -d 10.77.77.10 -j SNAT --to-source 10.77.77.7:4444

B
BasiC2k, 2020-04-27
@BasiC2k

Did you make your own certificate for each client? If both clients connect using the same certificate, then - who is the first, that and sneakers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question