Posted on November 4, 2020 at 12:57 am
Assuming that default ethernet network interface is eth0.
And that you added a new IP 126.96.36.199 on the VPS that got assigned to eth0:1 interface.
You can add “local 188.8.131.52” in your OpenVPN server config, e.g:
So OpenVPN will listen on the specificed IP address.
Then you need to restart OpenVPN:
Here is an example of iptables rules I used:
-P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -A INPUT -i tun0 -j ACCEPT -A INPUT -i eth0:1 -p udp -m udp --dport 1194 -j DROP -A FORWARD -i tun0 -o eth0:1 -j ACCEPT -A FORWARD -i eth0:1 -o tun0 -j ACCEPT
* From a recent test looks like is not needed to use eth0:1, just use eth0.
On client .ovpn config file I added this:
remote 184.108.40.206 1194
All works fine, however when you use the VPN client it will use the eth0 IP.
And not the specified IP 220.127.116.11 (eth0:1).
You can make sure OpenVPN uses the specified IP 18.104.22.168 like this:
- Customer emails don't show up in Zendesk
- Get Windows 7, 8, 10 License Information
- Cheapest Alternatives to Mailchimp, Sendinblue, Sendgrid
- Convert InnoSetup EXE Installer to MSI
- Get Serial Number of CPU, RAM, Motherboard, HDD
- Get Number of Intel Processor Cores via Registry
- Zendesk Remove [Business Name] from Email Subject on Ticket Replies
- Best Text-to-Speech (TTS) Web Services with Human Voices
- Exclude Packages from Apt-Get Upgrade on Debian Linux
- Should I reboot Debian server after apt-get upgrade?
- Download and Install OpenVPN Client on Windows 10
- How to List All Iptables NAT Rules
- How to List INPUT, FORWARD, OUTPUT Iptables Rules
- OpenVPN Iptables Rules
- Parse or Split FTP URL in Delphi XE using TIdURI
- Public FTP Server to Test Upload and Download