
![]() |
deregular
You guys will probably be able to help me with this.
I have a dev server here that I use for production work. It is connected directly to my router and Im accessing from my home network with Samba.Everytime I do a server reboot however, the IP changes, and I have to manually go in and alter all the network settings again, to be able to get it all operating again properly.My router is setup to distribute local ips... (re.. 192.168.0.*) to the boxes on the network.<>How do ensure that the freebsd machine, always connects back to thenetwork using the same IP? (192.168.0.10)>Probably an easy one, but I cant seem to find anything on it. (well nothing that gets through my thick skull anyway) perkiset
The
machine sounds like it's set for DHCP rather than a static address, that's all.I don't know enough FreeBSD to tell you how to do it, but if you can get to the GUI there will certainly be a network admin cpanel that will allow you to specify how you want the NIC to behave.deregular
GUI? whats that? never could get X running, never could be bothered really trying. lol
Anywho, managed to get it. It was set to DHCP. So for anyone who comes across this.. In my /etc/rc.conf i replaced ifconfig_em0=" ![]() with ifconfig_em0="192.168.0.50 netmask 255.255.255.0"(em0 being my network adapter of course)Rebooted the box, and all is well. Now I just have to reset everything to run from 192.168.0.50. ratthing
You probably also want to make sure your router won't hand out that IP address to some other
machine on yournetwork, too. A well-behaved DHCP server *shouldn't*, but consumer home routers aren't well-known for being well-behaved. :-/You should also put the entry into your /etc/hosts file, so your local applications can do reverse name lookups if they happen to use the 192.x IP rather than the loopback interface (127.0.0.1). If you're feeling ambitious, you could do full-blown "fake" DNS for your local network http://www.langfeldt.net/DNS-HOWTO/BIND-8/DNS-HOWTO-5.html.=RT= deregular
Thanks ratthing.
Already have altered the hosts file. ::1 localhost localhost.server 127.0.0.1 localhost localhost.server 192.168.0.50 localhost localhost.server 192.168.0.50 server.localhost Not sure why it had a double entry for the *.50 ip but meh.. it works.. Bookmarked the fake dns stuff for future reference, took a quick look at it and recognize the arpa settings as Ive been playing with them of late on our work servers. (this shit just fries my brain though, I guess it'll sink in sooner or later) perkiset
quote author=deregular link=topic=676.msg4732#msg4732 date=1199585883 Not sure why it had a double entry for the *.50 ip but meh.. it works.. I often have multiple names for a single address... that's all that's happening there. ratthing
quote author=deregular link=topic=676.msg4732#msg4732 date=1199585883 Bookmarked the fake dns stuff for future reference, took a quick look at it and recognize the arpa settings as Ive been playing with them of late on our work servers. (this shit just fries my brain though, I guess it'll sink in sooner or later) You're welcome. DNS is not really that complicated, just another form of pointers, so you should be able to wrap your head around it if you get the latter. I don't really need fake DNS but I may go ahead and implement it as my ISP's DNS servers suck rocks so bad I've been considering implementing a caching name server anyway. If I do, I'll document it step-by-step, otherwise I won't remember wtf I did later. :huh: I'll post when I do. =RT= |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads