Jail gateway problem.

Status
Not open for further replies.

V4M

Dabbler
Joined
Jun 10, 2016
Messages
17
Welcome,


I have issue with jails networking.

I have two LAN's, one is my main lan, second is for web services.

Main LAN is: 10.20.0.0/16, web LAN is: 100.200.0./24.

They are both on separate routers, and have different public IP's (two ISP's).

FreeNAS server has one NIC (bge0) on main LAN (SMB, plex, and all), and second NIC (bge1) on web LAN.

I'm trying to set up transmission jail to use web LAN, not main LAN.


When I uncheck VIMAGE I can choose NIC bge1, transmission interface works, and I can ping all addresses from web LAN. But I can't ping anything in internet.



I had tried to to add defaultrouter=”gwIP” to /etc/rc.conf in jail, no results.

Also # route add 100.200.0.1 returns: route: writing to route socket: operation not permited



netstat -nr

100.200.0.23 link#2 UHS lo0



When I enable VIMAGE and setup IP manually, jail is always using bge0.



I had similar setup but with debian with phpvirtualbox and it is working, VM has bridged adapter and it is using second NIC.



I have no idea how what else I can do to make it works.

Thanks for any suggestions.
 
Last edited by a moderator:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I don't know how to solve your problem, but for the record, 100.200.0.0/24 is not something you should allocate to your LAN.

Suggest you use 10.21.0.0/16 instead, which is permitted.
 

V4M

Dabbler
Joined
Jun 10, 2016
Messages
17
Address 100.200.0.0/24 was only for example, it is 10.1.80.0/24 (i had forgot that IP pool, and improvise when I was writing that post).


I will try to change netmask, or IP pools, but my main problem is that I don't know haw to force jail to use second gateway instead system default one.

I had trafic to all devices in pool 10.1.80.0/24 (ssh, http), but jail is trying to use 10.20.0.1 as gate.
 
Status
Not open for further replies.
Top