Jump to content

Raspberry Pi 3 VPN

Hey guys. I'm using OpenPVN on my Pi3 and I want to change the DHCP IP it gives out. I'm trying to find out how. If someone could help me. Thanks.

CPU: AMD Ryzen 5 5600X | CPU Cooler: Stock AMD Cooler | Motherboard: Asus ROG STRIX B550-F GAMING (WI-FI) | RAM: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3000 CL16 | GPU: Nvidia GTX 1060 6GB Zotac Mini | Case: K280 Case | PSU: Cooler Master B600 Power supply | SSD: 1TB  | HDDs: 1x 250GB & 1x 1TB WD Blue | Monitors: 24" Acer S240HLBID + 24" Samsung  | OS: Win 10 Pro

 

Audio: Behringer Q802USB Xenyx 8 Input Mixer |  U-PHORIA UMC204HD | Behringer XM8500 Dynamic Cardioid Vocal Microphone | Sound Blaster Audigy Fx PCI-E card.

 

Home Lab:  Lenovo ThinkCenter M82 ESXi 6.7 | Lenovo M93 Tiny Exchange 2019 | TP-LINK TL-SG1024D 24-Port Gigabit | Cisco ASA 5506 firewall  | Cisco Catalyst 3750 Gigabit Switch | Cisco 2960C-LL | HP MicroServer G8 NAS | Custom built SCCM Server.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

If you're trying to change the default IP of your OVPN config files, there's a default template file somewhere in the OpenVPN install (I believe ~/client-configs/base.conf) you can change. I recently set this up on my Pi using PiVPN so I might suggest that you try that (the setup script lets you choose a new IP).

http://www.pivpn.io/

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, cdsboy2000 said:

If you're trying to change the default IP of your OVPN config files, there's a default template file somewhere in the OpenVPN install (I believe ~/client-configs/base.conf) you can change. I recently set this up on my Pi using PiVPN so I might suggest that you try that (the setup script lets you choose a new IP).

http://www.pivpn.io/

That's what I used. Currently any client that connects gets an IP of 10.8.0.2 and I want to change it 192.168.1.0. That's what I'm trying to do. There's no option for me to that. 

CPU: AMD Ryzen 5 5600X | CPU Cooler: Stock AMD Cooler | Motherboard: Asus ROG STRIX B550-F GAMING (WI-FI) | RAM: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3000 CL16 | GPU: Nvidia GTX 1060 6GB Zotac Mini | Case: K280 Case | PSU: Cooler Master B600 Power supply | SSD: 1TB  | HDDs: 1x 250GB & 1x 1TB WD Blue | Monitors: 24" Acer S240HLBID + 24" Samsung  | OS: Win 10 Pro

 

Audio: Behringer Q802USB Xenyx 8 Input Mixer |  U-PHORIA UMC204HD | Behringer XM8500 Dynamic Cardioid Vocal Microphone | Sound Blaster Audigy Fx PCI-E card.

 

Home Lab:  Lenovo ThinkCenter M82 ESXi 6.7 | Lenovo M93 Tiny Exchange 2019 | TP-LINK TL-SG1024D 24-Port Gigabit | Cisco ASA 5506 firewall  | Cisco Catalyst 3750 Gigabit Switch | Cisco 2960C-LL | HP MicroServer G8 NAS | Custom built SCCM Server.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Abdul201588 said:

That's what I used. Currently any client that connects gets an IP of 10.8.0.2 and I want to change it 192.168.1.0. That's what I'm trying to do. There's no option for me to that. 

Ah, I understand what you mean. Maybe try looking here?

https://openvpn.net/archive/openvpn-users/2007-08/msg00037.html

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, cdsboy2000 said:

Ah, I understand what you mean. Maybe try looking here?

https://openvpn.net/archive/openvpn-users/2007-08/msg00037.html

Where do I change the settings? LOL 

CPU: AMD Ryzen 5 5600X | CPU Cooler: Stock AMD Cooler | Motherboard: Asus ROG STRIX B550-F GAMING (WI-FI) | RAM: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3000 CL16 | GPU: Nvidia GTX 1060 6GB Zotac Mini | Case: K280 Case | PSU: Cooler Master B600 Power supply | SSD: 1TB  | HDDs: 1x 250GB & 1x 1TB WD Blue | Monitors: 24" Acer S240HLBID + 24" Samsung  | OS: Win 10 Pro

 

Audio: Behringer Q802USB Xenyx 8 Input Mixer |  U-PHORIA UMC204HD | Behringer XM8500 Dynamic Cardioid Vocal Microphone | Sound Blaster Audigy Fx PCI-E card.

 

Home Lab:  Lenovo ThinkCenter M82 ESXi 6.7 | Lenovo M93 Tiny Exchange 2019 | TP-LINK TL-SG1024D 24-Port Gigabit | Cisco ASA 5506 firewall  | Cisco Catalyst 3750 Gigabit Switch | Cisco 2960C-LL | HP MicroServer G8 NAS | Custom built SCCM Server.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Abdul201588 said:

Where do I change the settings? LOL 

I'm honestly not sure. Any particular reason why you're trying to do this?

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, cdsboy2000 said:

I'm honestly not sure. Any particular reason why you're trying to do this?

Connecting my cloud server to my on-premise network

CPU: AMD Ryzen 5 5600X | CPU Cooler: Stock AMD Cooler | Motherboard: Asus ROG STRIX B550-F GAMING (WI-FI) | RAM: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3000 CL16 | GPU: Nvidia GTX 1060 6GB Zotac Mini | Case: K280 Case | PSU: Cooler Master B600 Power supply | SSD: 1TB  | HDDs: 1x 250GB & 1x 1TB WD Blue | Monitors: 24" Acer S240HLBID + 24" Samsung  | OS: Win 10 Pro

 

Audio: Behringer Q802USB Xenyx 8 Input Mixer |  U-PHORIA UMC204HD | Behringer XM8500 Dynamic Cardioid Vocal Microphone | Sound Blaster Audigy Fx PCI-E card.

 

Home Lab:  Lenovo ThinkCenter M82 ESXi 6.7 | Lenovo M93 Tiny Exchange 2019 | TP-LINK TL-SG1024D 24-Port Gigabit | Cisco ASA 5506 firewall  | Cisco Catalyst 3750 Gigabit Switch | Cisco 2960C-LL | HP MicroServer G8 NAS | Custom built SCCM Server.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

23 hours ago, Abdul201588 said:

That's what I used. Currently any client that connects gets an IP of 10.8.0.2 and I want to change it 192.168.1.0. That's what I'm trying to do. There's no option for me to that. 

If you want your VPN clients to be in your local network and not in 10.8.0.0 then you should change tun device to tap in your server.conf and client.conf files. Take a look in here

https://openvpn.net/index.php/open-source/documentation/miscellaneous/76-ethernet-bridging.html

https://www.aaflalo.me/2015/01/openvpn-tap-bridge-mode/

Computer users fall into two groups:
those that do backups
those that have never had a hard drive fail.

Link to comment
Share on other sites

Link to post
Share on other sites

Did you install OpenVPN with this method? curl -L https://install.pivpn.io | bash

 

If so, you're likely running Raspbian on the Pi, which means DHCP is managed by Raspbian.

Now there are 2 DHCP configuration files depending on whether you're connecting to it via the wireless or wired NIC.

 

SSH into the Pi (may have to enable that first), open /etc/dhcpcd.conf via in your favorite text editor (vi or nano).

Does it have 10.8.0.1 listed as the static router? If so, this is the file to modify. If not, look in /etc/wpa_supplicant/wpa_supplicant.conf

 

Bear in mind Raspbian has changed the way DHCP is configured multiple times since it was created, following Debian's lead (roughly). I have to look this process up every time I go to do it now and I always encounter "old" configurations and mess it up. Be prepared to wipe it and start fresh ;-)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×