Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6144

How to give clients access to the Internet via a VPN server (OpenConnect VPN server) [closed]

$
0
0

I'm trying to set up an OpenConnect VPN server. The server is installed on a machine with a public IP address of 154.154.154.154. VPN server network: 192.168.2.0/24. VPN server listens to port 1234 on the machine. The routing table on the machine (ip route):

default via 154.154.154.1 dev eth0192.168.2.0/24 via 154.154.154.154 dev eth0154.154.154.0/24 dev eth0 proto kernel scope link src 154.154.154.154

A forward is also included:

  1. /etc/sysctl.conf: net.ipv4.ip_forward = 1
  2. /etc/default/ufw: DEFAULT_FORWARD_POLICY="ACCEPT"But it is not possible to access the Internet through a VPN yet. But after executing this command:iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eth0 -j MASQUERADEIt turns out, but the traffic comes from the client's device (when logging on 2ip.ru I see the address of the client's provider, not the public address of the machine - 154.154.154.154), and not from the VPN server. How can I make the traffic come from a VPN server?

Viewing all articles
Browse latest Browse all 6144

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>