I everyone. I'm new with openvpn stuffs and I'm trying to implement a new VPN concentrator using a routed openvpn configuration. Here is the configuration file:
local external_ip_
proto udp
port 1194
dev tun0
server 192.168.222.0 255.255.255.0
push "route x.x.x.x 255.255.255.0 192.168.222.1"
client-to-client
comp-lzo
persist-key
persist-tun
keepalive 5 30
tls-server
dh /etc/openvpn/keys/dh1024.pem
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/openvpn.crt
key /etc/openvpn/keys/openvpn.key
status /var/log/openvpn-status.log
log /var/log/openvpn.log
log-append /var/log/openvpn.log
verb 4
mute 20
tls-timeout 10
Note that network address that I put "push" line is different than "server" line network address.
After this configuration, I put this lines on my firewall script:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o tun+ -j ACCEPT
iptables -A INPUT -p tcp --dport 1194 -j ACCEPT
iptables -A INPUT -p udp --dport 1194 -j ACCEPT
I'm looking for a solution since 2 months ago and couldn't resolve this, so I thought you guys could help...
I appreciate if you can help me, because I dont have much experience with any kind of vpn concentrator and we would like to use OpenVPN in our production environment and migrate to OpenVPN Access Server in the future.
Regards.