More than one IP

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.

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

Locked
leanne
OpenVpn Newbie
Posts: 7
Joined: Wed May 21, 2014 1:54 pm

More than one IP

Post by leanne » Wed May 21, 2014 2:07 pm

Hello,

I am basically experienced with openVPN, I have been using it on my servers for a couple of years. I always install on the main IP of the server and my installations work with no problem.

Now I have a situation in which I have a server with 3 IPv4 and I need to install openVPN so the client can choose at will any of the IPs to use while the other client (are only 2 clients) can simultaneously use independently any of the IPs.

My questions are:

1) How I set up openVPN so it works with three separate IPs in independent sessions
2) How I set iptables to use eth0, eth0:1 and eth0:2. Now I use:

# VPN
iptables -t filter -A FORWARD -i tun0 -o eth0 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 1194 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 1194 -j ACCEPT
iptables -t filter -A INPUT -p udp --dport 1194 -j ACCEPT
iptables -t filter -A OUTPUT -p udp --dport 1194 -j ACCEPT
echo - VPN [OK]

I tried diverse ways but I didn't manage so I am asking if someone has done this and can share his/her experience with me.

Thanks

Leanne

leanne
OpenVpn Newbie
Posts: 7
Joined: Wed May 21, 2014 1:54 pm

Re: More than one IP

Post by leanne » Thu May 22, 2014 9:40 am

debbie10t wrote:
The Manual wrote:--local host
  • Local host name or IP address for bind. If specified, OpenVPN will bind to this address only. If unspecified, OpenVPN will bind to all interfaces.
Does that mean that when I build the server conf file I don´t write the line with the IP number ? : local 111.222.111.222. Just that?

Locked