Adding IPV4 alias to jail

Status
Not open for further replies.

driesken

Cadet
Joined
Dec 23, 2014
Messages
6
Hi,

I've setup a OpenVPN server that works on addresses for the 172.16.1.x network. My transmission jail has an IP of 172.16.0.202.

I've tried to add an alias, but it doesn't seem to work.

IPV4 address is 172.16.0.202
IPV4 netmask: /24

I've also added IPv4 bridge alias: 172.16.1.1
IPV4 default gateway is 172.16.0.1
IPV4 bridge netmask is /24

I can ping 172.16.1.1 from within the freenas jail, however, when I add an IPV4 alias (like 172.16.1.208), this stops working.

What am I overlooking here?
 

driesken

Cadet
Joined
Dec 23, 2014
Messages
6
Actually, I didn't. I did a workaround by configuring openVPN so the address on 172.16.0.202 is routed through the VPN. Downside is that I can't NAT it to be able to access it from outside.
 

Dave Genton

Contributor
Joined
Feb 27, 2014
Messages
133
Its because you have a /24 bit mask which translates to 255.255.255.0 as a mask, but you are working with two seperate subnets, 172.16.0.0/24 and 172.16.1.0/24, you have to keep them on the SAME subnet. If you change your subnet mask on all devices to be a /23 or 255.255.254.0 instead it will cover ip ranges of 172.16.0.0 thru 172.16.1.255 but I wouldn't suggest doubling the size of your host portion of the network, just keep them on the same /24 subnet, keep it simple. As soon as you use the 172.16.0.0 with 172.16.1.0 it requires a default gateway and a router with knowledge of or connection to 172.16.1.0 in order to "route" or forward the packet to that destination. You cannot bridge them on a single wire and expect them to work, a router is required to forward a packet from one network/subnet to another.
 

Dave Genton

Contributor
Joined
Feb 27, 2014
Messages
133
Oh so you're using dd-wrt, well then if you have two interfaces configured, each with that correct subnet and mask then that could would surely forward it properly with no further configuration. It will see each as a local route, and forward the packet accordingly. you did make it sound as if it were one segment using both network subnets with /24 masks however....make sure the subnet mask on the router interfaces are both correct, and then each computer should have its respective default gateway configured, with the gateway configured it will forward to the router, router will forward as stated. Without the gateway on each pc, it will fail, even if only one is missing, due to both paths being required.

hope that helps..
 
Status
Not open for further replies.
Top