Network setup in freebsd

ftp4you

Member
Sep 28, 2001
148
0
0
Just another question


Was wondering why when I use sysinstall to setup network interface by dhcp it detects everything fine and everything seems to work. But if i disable dhcp in my router and do everything manualy. I have problems...


I went into sysinstall and clicked serch for dhcp server in network interface setup. When it couldn't find a dhcp server it pops up a screen where you can enter stuff yourself. I pluged in the ip and dns name and plugged in my gateway in there areas that looks to me where they need to be (Hope there the right spot). Then reboot the box. After I come back up i log in as root and test setting by pinging www.yahoo.com and also make sure i can ping computers on my network. All seems to be good. But when I go into kde (x windows version 4.2) and run netscape or xchat it seems like i'm not setup right.

I was looking in the rc.conf file to see if there was areas in there to plug in my dns and gateway addresses but had no luck. Other weird thing is i'm useing a linksys router and when i'm in kde useing netscape 6 and I try to connect to router it seems to locate it but then when I plug in password it pops pops up a error lost connection to host or something.

Was wondering what config file do I need togo into so that I can set this up correctly.


Thanks for all your help
 

freebsddude

Senior member
Jan 31, 2002
298
0
0
What specific problems do you have when you go into kde ?

1. Typically the default network settings can be found in /etc/defaults/rc.conf

2. You can override them in /etc/rc.conf.

3. With a static IP setup you change the defaultrouter from "NO" to the value
of your gateway IP address. Not sure about the DHCP option(s).

Also ensure that these options are enabled in rc.conf:

# enable named server
named_enable="YES"

# enable router
router_enable="YES"

4. You specify the order of DNS search in /etc/resolv.conf, i.e. list the IP address for each DNS machine.

3. A sample rc.conf can be found under /usr/share/examples/etc/defaults/rc.conf.

If you are running DHCP, I dont believe you need to change any of your
rc.conf settings, since you indicate that you are having problems only in kde.

I am not familiar with kde, but there may be a config file or environment variables
that you may need to setup.

I have DHCP enabled on my router, but not on my FreeBSD box.

To ensure that the FreeBSD box always gets the same internal IP, I assigned such an
internal static IP on the FreeBSD box and did port forwarding.

Meaning, if you have an external static IP assigned to your router, you can forward certain ports like
53 (DNS), 22(ssh), 80 (http) etc. and run those daemons on FreeBSD.
(If you have an static IP for your router, per your ISP, it may have an external and an internal IP).

I found this approach to be easier for my FreeBSD box. So for example, anything that tries to access
port 80 on your router will get forwarded/redirected to your FreeBSD box.

Hopefully this helps, Best Wishes!