I using openvpn to connect to a commercial VPN. Everything is fine, but the whole LAN is connect to VPN, and I want to connect just one IP of the LAN to the VPN using openvpn on ipfire.
I try those :
iptables -t nat -A POSTROUTING -s 192.168.35.0/24 -o tun0 -j MASQUERADE
result : all the LAN get access to VPN
iptables -t nat -A POSTROUTING -s 192.168.35.4 -o tun0 -j MASQUERADE
result : the IP 192.168.35.4 get access to VPN but the rest of the LAN lost access to internet.