Thanks Mathias! Your configuration works perfect. I can ping to any host in any network.
That is great. Thank you very much for your help. Now I have a good VPN system. Best regards. 2015-05-20 0:05 GMT+02:00 Mathias Jeschke <openvpn-us...@0xaffe.de>: > Hi all, > > On 2015-05-19 on 23:36 Jan Just Keijser wrote: > >> yeah, it would simply be a matter of >> >> host1# openvpn --dev tun --secret static.key --ifconfig 10.200.0.1 >> 10.200.0.2 >> >> host2# openvpn --dev tun --secret static.key --ifconfig 10.200.0.2 >> 10.200.0.1 --remote host1 >> >> After the connection has come up, add static routes: >> >> host1# route add -net 192.168.2.0/24 gw 10.200.0.2 >> >> host2# route add -net 192.168.1.0/24 gw 10.200.0.1 >> >> >> the trick is: how do you get this into an OpenWRT config file? I have no >> clue > > It is actually quite equivalent: > > Just paste the config below for > - Alice (is connected to lan 192.168.1.0/24) and > - Bob (is connected to lan 192.168.1.0/24) > to /etc/config/openvpn and run "/etc/init.d/openvpn restart": > > # --- Config for "Alice" ---- > config 'openvpn' 'alice_bob' > option 'enable' '1' > option 'dev' 'tun' > option 'secret' '/etc/openvpn/static.key' > option 'ifconfig' '10.200.0.1 10.200.0.2' > option 'route' '192.168.2.0 255.255.255.0' > > > # --- Config for "Bob" ---- > config 'openvpn' 'bob_alice' > option 'enable' '1' > option 'dev' 'tun' > option 'secret' '/etc/openvpn/static.key' > option 'ifconfig' '10.200.0.2 10.200.0.1' > option 'route' '192.168.1.0 255.255.255.0' > option 'remote' 'host1' > > > Probably you also want to add some additional options on both ends: > > .... > option 'keepalive' '10 180' > option 'comp_lzo' 'yes' > > > HTH, > Mathias. -- Josu Lazkano ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users