Score:1

unable to set the openvpn network to look for a specific subnet behind a specific client

bm flag

I have an openvpn network I have client with the ip 10.8.0.2 and that client have this subnet 192.168.43.0/24 I want the entire openvpn network to look for the subnet 192.168.43.0/24 in 10.8.0.2

Here's what I've tried

sudo sysctl -w net.ipv4.ip_forward=1

sudo iptables -A FORWARD -j ACCEPT

sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/16 ! -d 10.8.0.0/16 -j SNAT --to 10.0.0.4

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

The ip 10.0.0.4 is the private ip of the vpn server

I have also tried the above with this

sudo ip route add 192.168.43.0/24 via 10.8.0.2

Score:0
bm flag

I have found the answar for my question.

first in the server configuration file i added this line

route 192.168.43.0 255.255.255.0

and also I've added this line

client-config-dir /etc/openvpn/client

the name of my client was test so i've created a file named test in the folder /etc/openvpn/client/ and then i added this line into that file

iroute 192.168.43.0 255.255.255.0

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.