You should be able to put the commands in /etc/rc.d/rc.local
, but I read (somewhere, can't find the link right off) about a more elegant (to me) solution:
You add a line like:
. In addition, create one called /etc/sysconfig/networking/devices/ifcfg-bridge0
(or whatever you want to call the bridge) with something like:
# static address
# dynamic address (dhcp)
section, commented out, shows how to set it up with a dynamic route instead of static
, in case you want to let the router give an address to the NAS.
Finally, create a /etc/sysconfig/static-routes
any: net 127.0.0.0 netmask 255.0.0.0 dev lo
any: net default gateway 192.168.1.1 bridge0
I think I made all the name & address changes (in bold
You should be able to use service network stop
, make the changes, then service network start
for testing, instead of actually having to reboot. I believe most of the info can be found in /usr/share/doc/initscripts-8.95/sysconfig.txt
, but it's a bit cryptic.
I should also point out that the above is from my old Fedora 4
system (an old system I use as a light server for a small LAN). The bridge comes up automatically after reboots (usually power interruptions). Of course, you also need the bridge-utils
package (and the ebtables
package might be useful).
I haven't tried the same set-up on a more recent version of Fedora.
Edit: I'm not sure if it will make a difference, but I think those files should be in /etc/sysconfig/network-scripts/
instead of /etc/sysconfig/networking/devices/