Hello. I ask for your help.
I installed VPN-Server very well (on a dedicated VPS). So I installed the clients on the remote computers and they all connect fine with each other.
How to forward vpn-server-ip:port to specifically one of the client-ip:ports outside the VPN?
Thanks.
VF
Forwarding an exterior-ip:port to an interior-client-ip:port
-
- Posts: 3
- Joined: Mon Dec 23, 2024 1:24 am
-
- Posts: 1548
- Joined: Sun Feb 14, 2021 10:31 am
Re: Forwarding an exterior-ip:port to an interior-client-ip:port
It's OS-specific and has nothing to do with SoftEther. Ask on a Windows or Linux forum.
-
- Posts: 3
- Joined: Mon Dec 23, 2024 1:24 am
-
- Posts: 1548
- Joined: Sun Feb 14, 2021 10:31 am
Re: Forwarding an exterior-ip:port to an interior-client-ip:port
SoftEther isn't a port-forwarder, understood?
-
- Posts: 3
- Joined: Mon Dec 23, 2024 1:24 am
Re: Forwarding an exterior-ip:port to an interior-client-ip:port
Hi;
You didn't understand my question (or I explained it poorly).
What I want to know is how to route traffic from OUTSIDE the VPN to INSIDE the VPN.
I want anyone who accesses external-ip:port to be forwarded to internal-ip:port.
Clearly this is a function of SoftEther !!!
Thanks for the help.
-
- Posts: 1548
- Joined: Sun Feb 14, 2021 10:31 am
Re: Forwarding an exterior-ip:port to an interior-client-ip:port
What have you got to support this... revelation?
-
- Posts: 6
- Joined: Thu Jan 14, 2016 9:52 am
Re: Forwarding an exterior-ip:port to an interior-client-ip:port
iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 1024:65535 -j DNAT --to-destination 10.10.10.111:1024-65535
iptables -A PREROUTING -i eth0 -p udp -m udp --dport 1024:65535 -j DNAT --to-destination 10.10.10.111:1024-65535
iptables -A POSTROUTING -s 10.10.10.0/24 -o eth0 -j SNAT --to-source 1.2.3.4
iptables rules example
DO NOT use SecureNAT. Use dnsmasq for DHCP and iptables for NAT
eth0 is your vps server main network interface and 1.2.3.4 is eth0 ip address
10.10.10.0/24 is vpnserver interface ip cidr
10.10.10.111 is your vpnclient ip address
1024:65535 is ip port range from 1024 to 65535
iptables -A PREROUTING -i eth0 -p udp -m udp --dport 1024:65535 -j DNAT --to-destination 10.10.10.111:1024-65535
iptables -A POSTROUTING -s 10.10.10.0/24 -o eth0 -j SNAT --to-source 1.2.3.4
iptables rules example
DO NOT use SecureNAT. Use dnsmasq for DHCP and iptables for NAT
eth0 is your vps server main network interface and 1.2.3.4 is eth0 ip address
10.10.10.0/24 is vpnserver interface ip cidr
10.10.10.111 is your vpnclient ip address
1024:65535 is ip port range from 1024 to 65535