Finally i got OpenVPN up running, but now i really miss accessing all my webservices (apache, ftp, ssh etc.) through the VPN server. Is there a simple way to route all traffic from my wlan1 device to tap0?
port 1193 proto tcp dev tap0 ca ca.crt cert server.crt key server.key # This file should be kept secret dh dh1024.pem ifconfig-pool-persist ipp.txt server 10.8.0.0 255.255.255.0 keepalive 10 120 ;tls-auth ta.key 0 # This file is secret comp-lzo user nobody group nogroup persist-key persist-tun status openvpn-status.log verb 3 script-security 2
I was actually hoping that this forward would solve the problem but this was not the case:
/sbin/iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE /sbin/iptables -A FORWARD -i wlan -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT /sbin/iptables -A FORWARD -i tun0 -o eth0 -j ACCEPT
This is basically my setup:
DSL router -> Wireless router -> Ubuntu server.
Ubuntu server i have hosted apache, ssh, and other server applications and services. When a client access my server by VPN, i would like to access all these services.