change Ip adress

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
Hude
OpenVpn Newbie
Posts: 1
Joined: Mon Jul 31, 2023 7:04 am

change Ip adress

Post by Hude » Mon Jul 31, 2023 11:09 am

Hello all together,
I need your swarm knowledge.
I have installed openvpn on a Raspberry and now I want to change the Ip address of the VPN connections.

In the server.conf file I have already made the change, but without success.
The virtual IP is currently on 10.249.157.*
But I would like to change it to 10.8.0.*

here is an excerpt from my server.conf

Code: Select all

dev tun
proto udp
port *****
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/*********************************
key /etc/openvpn/easy-rsa/pki/private/***********************
dh none
ecdh-curve prime256v1
topology subnet
server 10.8.0.0 255.255.255.0
#server 10.249.157.0 255.255.255.0
# Set your primary domain name server address for clients
#push "dhcp-option DNS 8.8.8.8"
#push "dhcp-option DNS 8.8.4.4"
# Prevent DNS leaks on Windows
#push "block-outside-dns"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
#push "redirect-gateway def1"
push "route 192.168.1.0 255.255.255.0"
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 15 120
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user openvpn
group openvpn
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 3
#DuplicateCNs allow access control on a less-granular, per user basis.
#Remove # if you will manage access by user instead of device.
#duplicate-cn
# Generated for use by PiVPN.io


ip a:

Code: Select all

pi@raspberrypi:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:48:7a:db brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.35/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 863766sec preferred_lft 755766sec
    inet6 fe80::a897:a569:d90c:d8a5/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether dc:a6:32:48:7a:dc brd ff:ff:ff:ff:ff:ff
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
    link/none
    inet 10.8.0.1/24 brd 10.8.0.255 scope global tun0
       valid_lft forever preferred_lft forever
    inet6 fe80::b21e:527b:efcc:3e43/64 scope link stable-privacy
       valid_lft forever preferred_lft forever
pi@raspberrypi:~ $

I hope you can help me

Post Reply