I am trying to configure my dd-wrt to have both the OpenVPN server and client on the same host. I have the following setup:
tun0 - VPN server on port 1193 with client on 192.168.2.* subnet being pushed to 192.168.1.*
tun1 - VPN client on port 1194
The client and server both run correctly when connecting through my local LAN. I can successfully connect through the server VPN and the the IP address shows that of the VPN client. However, when I am NOT on the local LAN, I can't connect through the VPN server. I am thinking that the issue lies in my iptables rules since everything works on the local LAN.
My current iptables rules are:
iptables -I INPUT 1 -p udp --dport 1193 -j ACCEPT
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.2.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o vlan2 -j SNAT --to-source $(nvram get wan_ipaddr)
I don't have any rules set for the client side since I am not sure what is needed. Sorry I don't have all of my config files at the moment, but I can post them if that will give a clearer picture. Does anyone have a similar setup that can give me some pointers? Even a general overview of the steps/rules necessary would be helpful.
Thanks in advance.