Re: FreeBSD 2 nic one to route one to DB - how do I?
- From: Tim Judd <tjudd@xxxxxxxxxxx>
- Date: Tue, 29 Aug 2006 23:01:55 -0600
Who Know wrote:
"Who Know" <jr_115@xxxxxxxxxxx> wrote in message news:44f4dc04$0$13977$edfadb0f@xxxxxxxxxxxxxxxxxxxxxxx"Edward Salonia" <esalonia@xxxxxxxxx> wrote in message news:IO6dnYYghv8dUmnZnZ2dnUVZ_v-dnZ2d@xxxxxxxxxxxxxxxVery close :) but....Who Know wrote:"Edward Salonia" <esalonia@xxxxxxxxx> wrote in message news:ztydnRCD2YEbI2nZnZ2dnUVZ_r2dnZ2d@xxxxxxxxxxxxxxxOh ok, I didn't understand fully... It seems to me, and I could be wrong. But I dont think you need a public IP for the DB server. Just put the DB server and the second nic on the webserver on its own private network. I think that will work since the Web server will be talking to the db server, not the public clients accessing the site... As for routing, you should have to do anythign special since from the point of view of the web server, it will be able to hit both networks it is attached to.Who Know wrote:My sitution is better explained here:I have a lovely server whit two nics. I want to "abuse" them both :)Not sure of the config file with MySQL but with regards to apache. There is a directive to specify what address/nic it will listen on. I would guess the same goes for the sql config file.
The first nic should handle the normal www traffic (The outsite card)
The second nic should route to the DB server.
My OS is FreeBSD 6.1-RELEASE
www= Apache 2.2
The DB is Mysql 5.x
My IP-Addresses is 87.52.171.128/24 and the IP to the first nic is 87.52.171.131
How do I set this up to force the second nic only to get to the DB server (Only one nic installed)
Other hardware to use for networking build is two swicthes One fare better than the second, therefore I'll prefere to only use that one. One Cisco router.
I have been reading a lot on this site http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-routing.html but i didn't understand it :/ mayby I have been reading to little.
Please give me the exact scipting lines and setup (For dummies)
http://www.vbulletin.org/forum/showthread.php?t=111191
or if you can't access the page you can see a copy here:
http://gndindex.com/showthread.php?p=3410#post3410
for example. the webserver will have 2 nic's (1 has pub ip for http access) (1 for private net between itself and db server for db connect)
priv nic on webserver 192.168.1.1 255.255.255.252
nic on db server 192.168.132.2 255.255.255.252
Am I any closer to understanding what you want to do?
What do I set the defaultrouter="?" to on the DB server? and should I add
gateway_enable="YES" and/or router_enable="YES" on the www server?
rc.conf on www server:
defaultrouter="87.52.171.129"
hostname="ns0.reck.dk"
ifconfig_em0="inet 87.52.171.131 netmask 255.255.255.224"
inetd_enable="YES"
keymap="danish.iso"
keyrate="fast"
sshd_enable="YES"
usbd_enable="NO"
sendmail_enable="NONE"
xntpd_enable="YES"
xntpd_flags="-g -p /var/run/ntpd.pid"
ifconfig_em1="inet 192.168.1.1 netmask 255.255.255.252"
#gateway_enable="YES"
#router_enable="YES"
#natd_enable="YES"
#natd_interface="87.52.171.131"
Make this result: (2 difrent switches)
ns0# ping db.reck.dk
PING db.reck.dk (192.168.132.2): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
make this result: (same switch)
ns0# ping db.reck.dk
PING db.reck.dk (192.168.132.2): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
The same happen from db to www server :(
you won't get very far without a proper DNS where th FBSD machine can work with.
You won't get very far between any link or connection with missing information.
So your FBSD machine is dual homed (2 NICs).. how do you want to setup the apache server? example:
<Big Internet>
\-> (NIC #1 on FBSD) FBSD NIC
\-> (NIC #2 on FBSD) DB server
-OR-
<Big Iternet>
|-> FBSD NIC #1
\-> DB server
Option 1 needs both NICs, option 2 only needs one NIC.
Do you have DHCP on your internal network? DNS? Is the FBSD your gateway aka router?
the advantage of option 2 is that anybody in the world can hit your database server, and exploit it, if there's a bug. Big benefit. J/K
The advantage of option 1 is security -- you only have one machine exposed.
please post more specs, I won't likely help again without them. Post the specs I asked for above, and I'll consider assisting.
.
- Follow-Ups:
- Re: FreeBSD 2 nic one to route one to DB - how do I?
- From: Who Know
- Re: FreeBSD 2 nic one to route one to DB - how do I?
- References:
- FreeBSD 2 nic one to route one to DB - how do I?
- From: Who Know
- Re: FreeBSD 2 nic one to route one to DB - how do I?
- From: Edward Salonia
- Re: FreeBSD 2 nic one to route one to DB - how do I?
- From: Who Know
- Re: FreeBSD 2 nic one to route one to DB - how do I?
- From: Edward Salonia
- Re: FreeBSD 2 nic one to route one to DB - how do I?
- From: Who Know
- Re: FreeBSD 2 nic one to route one to DB - how do I?
- From: Who Know
- FreeBSD 2 nic one to route one to DB - how do I?
- Prev by Date: Re: ICH7 Sata Issues - 6.1-Stable
- Next by Date: software raid on / ?
- Previous by thread: Re: FreeBSD 2 nic one to route one to DB - how do I?
- Next by thread: Re: FreeBSD 2 nic one to route one to DB - how do I?
- Index(es):
Relevant Pages
|