Re: [Openvpn-users] OpenVPN and NIC with multiple IP Addresses

2023-07-26 Thread Jason Long via Openvpn-users
Hello, Thanks again. Yes, I'm testing on a virtual machine and haven't moved it to a real server yet, But the public IP address has nothing to do with the server configuration file. The IP address is important for the client file that wants to connect to my server. In the client file, I must set

Re: [Openvpn-users] OpenVPN and NIC with multiple IP Addresses

2023-07-26 Thread Jochen Bern
On 26.07.23 07:44, Jason Long wrote: I just created a virtual NIC and all the iptables rules that I did for a real NIC, I did for this virtual NIC too. Consider an OpenVPN server that has one NIC with three public IPs and you want to run an OpenVPN server.conf file for each IPs. You must set thes

Re: [Openvpn-users] OpenVPN and NIC with multiple IP Addresses

2023-07-25 Thread Jason Long via Openvpn-users
Hello, I just created a virtual NIC and all the iptables rules that I did for a real NIC, I did for this virtual NIC too. Consider an OpenVPN server that has one NIC with three public IPs and you want to run an OpenVPN server.conf file for each IPs. You must set these three public IPs on your NI

Re: [Openvpn-users] OpenVPN and NIC with multiple IP Addresses

2023-07-25 Thread Jochen Bern
On 25.07.23 12:22, Jason Long wrote: You said "The rules seem to assume that Internet traffic *will* go out $IF_MAIN and not enp0s3.", Why enp0s3? I created a virtual NIC (enp0s3:0) and I want my traffic go through it. Am I wrong? I have no reason to doubt that you WANT to have it work like thi

Re: [Openvpn-users] OpenVPN and NIC with multiple IP Addresses

2023-07-25 Thread Jason Long via Openvpn-users
Hello, Thank you so much for your reply. You said "The rules seem to assume that Internet traffic *will* go out $IF_MAIN and not enp0s3.", Why enp0s3? I created a virtual NIC (enp0s3:0) and I want my traffic go through it. Am I wrong? And: # cat /proc/sys/net/ipv4/conf/all/forwarding 1 # # cat

Re: [Openvpn-users] OpenVPN and NIC with multiple IP Addresses

2023-07-25 Thread Jochen Bern
On 25.07.23 09:54, Jason Long via Openvpn-users wrote: enp0s3: flags=4163  mtu 1500         inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255 enp0s3:0: flags=4163  mtu 1500         inet 10.0.5.20  netmask 255.255.255.0  broadcast 10.0.5.255 ... so you have several distinct subnets a

[Openvpn-users] OpenVPN and NIC with multiple IP Addresses

2023-07-25 Thread Jason Long via Openvpn-users
Hello, My Server has two NICs: enp0s8 (LAN) enp0s3 (NAT) I created a virtual interface like the below: # touch /etc/network/interfaces.d/ifcfg-enp0s3:0 # nano /etc/network/interfaces.d/ifcfg-enp0s3:0 auto enp0s3:0 iface enp0s3:0 inet static address 10.0.5.20 netmask 255.255.255.0 Then: # syst