I setup an OpenVPN server on a Raspberry Pi and configured it according to the HOWTO. I want to expose certain hosts from the server-subnet (192.168.123.0/24) the clients.
push route 192.168.123.0 255.255.255.0
in the server.conf file. Also I setup
iptables the following way:
iptables -P INPUT DROP iptables -P OUTPUT DROP iptables -P FORWARD DROP #allow ssh and vpn on pi - working fine ...
According to OpenVPN - access policies this shoud allow traffich forwarding to either a specific host or the entire subnet (lines extracted from the HOWTO - these addresses are not my actual address ranges):
# Employee rule iptables -A FORWARD -i tun0 -s 10.8.0.0/24 -d 10.66.4.4 -j ACCEPT # Sysadmin rule iptables -A FORWARD -i tun0 -s 10.8.1.0/24 -d 10.66.4.0/24 -j ACCEPT # Contractor rule iptables -A FORWARD -i tun0 -s 10.8.2.0/24 -d 10.66.4.12 -j ACCEPT
Neither of this helps. However if I set
iptables -P FORWARD ACCEPT
and nothing else, I can see all of the hosts, which I do not want. What am I doing wrong?
Thank you for your help.