Hello,
I am using FreeBSD 9.1 with two NICs and two gateways set via setfib. I have a web server running on NIC1 in a jail. A database is running in the second jail hooked to NIC2. I can access both jails in the way I should, but I cannot access the database from the webserver jail.
Here is my rc.local
Could you advise how to configure ipfw/routing, so I can access the DB from a Web server jail? I tried to figure out how to make it, but didn't succeed :-(
Thank you in advance.
I am using FreeBSD 9.1 with two NICs and two gateways set via setfib. I have a web server running on NIC1 in a jail. A database is running in the second jail hooked to NIC2. I can access both jails in the way I should, but I cannot access the database from the webserver jail.
Here is my rc.local
Code:
/sbin/route delete default
/usr/sbin/setfib 0 /sbin/route delete default
/usr/sbin/setfib 0 /sbin/route add default 10.x.x.x
/usr/sbin/setfib 1 /sbin/route delete default
/usr/sbin/setfib 1 /sbin/route add default 148.x.x.x
ipfw -f flush
ipfw add allow ip from any to any via lo0
ipfw add setfib 0 ip from any to any via vmx3f1
ipfw add setfib 1 ip from any to any via vmx3f0
ipfw add allow ip from any to any
Could you advise how to configure ipfw/routing, so I can access the DB from a Web server jail? I tried to figure out how to make it, but didn't succeed :-(
Thank you in advance.