Login Register


Anyone who use OpenVPN & Windows? (opening port, forwarding) filter_list
Author
Message
RE: Anyone who use OpenVPN & Windows? (opening port, forwarding) #5
SOLUTION:
For bittorrent and other P2P apps it is about opening single port used for incoming connections, this port is usually defined in app settings.

Here is how to open that port (should be higher number in lower tens of thousand( like 23789, 55333).

On Linux VPN server:

iptables -t nat -A POSTROUTING -o venet0 -j MASQUERADE
iptables -t nat -A PREROUTING -i venet0 -p tcp --dport 1234 -j DNAT --to 10.8.0.2:1234

1234 - port to open, properly forward its connections into the tunnel. Range can be defined like this: --dport 1234:1240 and the "--to" would miss the port and only IP possibly.
10.8.0.2 - local IP address of the OpenVPN client network interface/adapter (shown by the OpenVPN client software and also in "ipconfig" Windows command output; may be different, like 10.8.0.3)
venet0 - Linux server network interface name (usually one with most traffic reported by "ifconfig" command, often "eth0")
tcp - connection type. there is also for example "udp", it may be needed to add one more rule separately for udp if is needed

Open yours defined port also on client/firewall. If it works, save iptables rules so it is restored after reboot.
Details are on this page (will work once you run this software).
(This post was last modified: 06-28-2022, 11:12 AM by wdc.)

Reply





Messages In This Thread
RE: Anyone who use OpenVPN & Windows? (opening port, forwarding) - by wdc - 06-28-2022, 11:09 AM



Users browsing this thread: 1 Guest(s)