hda-change-gw need to change the vpn settings too
this should be added to the hda-change-gw script.
the following file needs one change:
the line that says
push "route 192.168.178.0 255.255.255.0"
will need to be changed to
push "route 192.168.1.0 255.255.255.0"
same thing with this line:
push "dhcp-option DNS 192.168.178.20"
then service openvpn restart also.
#1 Updated by cpg over 10 years ago
- Assignee changed from essary to cpg
closing #691 in favor of this one.
when using the hda-change-gw script to change the gateway, the openvpn config needs to be regenerated, otherwise it gives out the old info. Specifically the dns and route. my openvpn config file: port 1194 proto udp ;dev tap dev tun ca /etc/openvpn/amahi/ca.crt cert /etc/openvpn/amahi/server.crt # This file should be kept secret key /etc/openvpn/amahi/server.key dh /etc/openvpn/amahi/dh1024.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist /var/run/openvpn-ipp.cache push "route 192.168.2.0 255.255.255.0" //this and the line below it are not changed. but there is no code currently to do it. push "dhcp-option DNS 192.168.2.15" push "dhcp-option DOMAIN home.com" keepalive 10 220 comp-lzo persist-key persist-tun status /var/log/openvpn-status.log verb 3 ;mute 20 plugin /usr/lib/openvpn/plugin/lib/openvpn-auth-pam.so "login login USERNAME password PASSWORD"
Also available in: Atom