I have openvpn installed on raspberry with pivpn
I have a problem as i use multiple vpn. Another VPN is using 10.8.0 address range as well.
So I need to change default 10.8.0.0 to 10.8.1.0
I updated in server.conf
topology subnet server 10.8.1.0 255.255.255.0
Plus the iptables: according to
*filter
:INPUT ACCEPT [842:102022]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [441:51651]
-A INPUT -i eth0 -p udp -m udp --dport 195 -m comment --comment openvpn-input-rule -j ACCEPT
-A FORWARD -d 10.8.1.0/24 -i eth0 -o tun0 -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment openvpn-forward-rule -j ACCEPT
-A FORWARD -s 10.8.1.0/24 -i tun0 -o eth0 -m comment --comment openvpn-forward-rule -j ACCEPT
COMMIT
reboot and test shows:
Wed Nov 3 19:52:28 2021 interactive service msg_channel=564 Wed Nov 3 19:52:28 2021 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 I=12 HWADDR=XX:29:76:ad:d7:XX Wed Nov 3 19:52:28 2021 open_tun Wed Nov 3 19:52:28 2021 tap-windows6 device [OpenVPN TAP-Windows6] opened Wed Nov 3 19:52:28 2021 TAP-Windows Driver Version 9.24 Wed Nov 3 19:52:28 2021 Set TAP-Windows TUN subnet mode network/local/netmask = 10.8.0.0/10.8.0.2/255.255.255.0 [SUCCEEDED] Wed Nov 3 19:52:28 2021 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.2/255.255.255.0 on interface {1114416D-AE7A-4C19-B2E1-971678130XXX} [DHCP-serv: 10.8.0.254, lease-time: 31536000] Wed Nov 3 19:52:28 2021 Successful ARP Flush on interface [15] {1114416D-AE7A-4C19-B2E1-971678130XXX} Wed Nov 3 19:52:28 2021 MANAGEMENT: >STATE:1635965548,ASSIGN_IP,,10.8.0.2,,,, Wed Nov 3 19:52:28 2021 IPv4 MTU set to 1500 on interface 15 using service Wed Nov 3 19:52:28 2021 Blocking outside dns using service succeeded. Wed Nov 3 19:52:33 2021 TEST ROUTES: 0/1 succeeded len=0 ret=0 a=0 u/d=up Wed Nov 3 19:52:33 2021 Route: Waiting for TUN/TAP interface to come up... Wed Nov 3 19:52:38 2021 TEST ROUTES: 0/1 succeeded len=0 ret=0 a=0 u/d=up Wed Nov 3 19:52:38 2021 Route: Waiting for TUN/TAP interface to come up...
i dont get why it still goes to 10.8.0.X
The opevpn DHCP seems to be on 10.8.0.254 -> so assume that i must also be able to change to 10.8.1.somewhat
Strange is once i reboot the pi, the iptables are back to 10.8.0.1 even though i updated
/etc/network/interfaces with "pre-up iptables-restore"
How can i change this in the current installation?
Thank you very much