Alternative methods to delegate IP to clients?

This forum is for admins who are looking to build or expand their OpenVPN setup.

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

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
dtremolo
OpenVpn Newbie
Posts: 2
Joined: Fri Dec 03, 2010 7:17 pm

Alternative methods to delegate IP to clients?

Post by dtremolo » Fri Dec 03, 2010 7:27 pm

Hi,

As for now, I have gotten a list of IPs to use from my hoster. The IP's are however not in the same subnet as my primary IP (on the server is). Even though it might be weird, it actually works because the primary gw of my server routes them, so I can setup interface aliases with netmask 255.255.255.255 and use them.
I would like to let clients use them, and ultimately it would be best to assign them to clients and route them to the default router. If that does not work, I could settle with, if possible, assign them to alias interfaces and map up NAT to internal IP's.

What are my options here? The 'server' directive only seem to work as a simple dhcp, requiring openvpn server and clients to be on the same subnet.

Server is Debian Lenny, the server is on x.122.219.0/24 net.

The list of IP's is:
x.122.219.158
x.122.217.228
x.122.219.201
x.33.47.190
x.33.45.176
x.33.40.244
x.33.41.19
x.122.219.67
x.33.44.246
x.33.43.39
x.33.44.47
x.33.43.147
x.122.218.197
x.33.41.62

User avatar
gladiatr72
Forum Team
Posts: 194
Joined: Mon Dec 13, 2010 3:51 pm
Location: Lawrence, KS

Re: Alternative methods to delegate IP to clients?

Post by gladiatr72 » Wed Dec 22, 2010 8:29 pm

Hello,

Wow.

First, let's assume eth0 is your internet facing device.

I would start out by setting up an ethernet bridge between eth0 and tap0 and then configuring openvpn for bridging via tap0. I would suggest setting up unique/static client configurations for your various client systems--in other words, no server-bridge configuration line on your server.

It is unorthodox and not terribly convenient, but I don't think it's impossible.

Good luck? Heh.

Regards,
Stephen
[..]I used to think it was awful that life was so unfair. [...]Wouldn't it be much worse if life were fair, and all the terrible things that happen to us come because we actually deserve them? -Marcus Cole

Post Reply