Unix noob adventures

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

Re: flip's Unix noob adventures

Postposted on Mon Dec 15, 2008 7:37 pm

If you're using /dev/sysmouse as your mouse device, you need moused enabled (moused_enable="YES" in rc.conf) and configured. Moused lets you use the mouse on the virtual consoles and share with X, but since you won't be using the local virtual consoles on the box, you might just want to change the mouse device to the direct hardware mouse device and keep moused disabled. Typically this is /dev/psm0, but it could be others (/dev/cuad0, /dev/mse0, /dev/ums0, etc.). Grep your dmesg output for "atkb" and you can generally find the mouse device.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: flip's Unix noob adventures

Postposted on Mon Dec 15, 2008 8:30 pm

Code: Select all
mail -s'some subject' user@address.com < filename
Buub
Maximum Gerbil
Silver subscriber
 
 
Posts: 4214
Joined: Sat Nov 09, 2002 11:59 pm
Location: Seattle, WA

Re: flip's Unix noob adventures

Postposted on Tue Dec 16, 2008 1:15 am

flip-mode wrote:Thanks Forge. I am having fun with this. Thanks for the patience everyone.

I just ran

    Xorg -configure
and it recognized my Dell 2007 FPW and claimed to recognize my mouse. But when I run

    Xorg -conf xorg.conf.new
the mouse does not work. Any thoughts?

Eventually, I want to get either KDE or Gnome (don't care which) running so I can do some web browsing and such.

Now that I have my two NICs up and running I am going to start exploring the firewall. I want an inclusive firewall I think (where only the traffic I specify is allowed) and I want NAT and port forwarding. Besides "read the handbook", is there any other advice that anyone has or any "heads up" type stuff to be said?

The other task at the top of the list is email. I haven't even gotten started on that.

Oh, and Samba.

And eventually, web browsing.

When you're ready for Samba, let me know and I'll point you to the right spot. It is actually not as difficult as all the articles out there make it out to be.

As for X.Org, it writes all of its data to "xorg.conf", and not "xorg.conf.new". Try just running X.Org without any options. (In Linux, the command to start X.Org is "startx", but your system may be different.)
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: flip's Unix noob adventures

Postposted on Tue Dec 16, 2008 3:44 am

Buub wrote:
Code: Select all
mail -s'some subject' user@address.com < filename
Thanks Buub. I am getting name server timeout errors.
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Tue Dec 16, 2008 3:48 am

titan wrote:When you're ready for Samba, let me know and I'll point you to the right spot. It is actually not as difficult as all the articles out there make it out to be.
I am taking a look at Samba right now. :D
As for X.Org, it writes all of its data to "xorg.conf", and not "xorg.conf.new". Try just running X.Org without any options. (In Linux, the command to start X.Org is "startx", but your system may be different.)
startx does fire up X.Org, but the mouse does not work. When I run Xorg -configure though, the mouse does work.
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Tue Dec 16, 2008 12:50 pm

flip-mode wrote:
Buub wrote:
Code: Select all
mail -s'some subject' user@address.com < filename
Thanks Buub. I am getting name server timeout errors.


Sounds like you need to configure /etc/resolv.conf
Buub
Maximum Gerbil
Silver subscriber
 
 
Posts: 4214
Joined: Sat Nov 09, 2002 11:59 pm
Location: Seattle, WA

Re: flip's Unix noob adventures

Postposted on Tue Dec 16, 2008 6:17 pm

Buub wrote:
flip-mode wrote:
Buub wrote:
Code: Select all
mail -s'some subject' user@address.com < filename
Thanks Buub. I am getting name server timeout errors.


Sounds like you need to configure /etc/resolv.conf


ping msn.com to verify DNS.
Siglessness is boring.
Image - M4800-Eight1
Image - Vargr-Z97
Forge
Lord High Gerbil
Silver subscriber
 
 
Posts: 8059
Joined: Wed Dec 26, 2001 7:00 pm
Location: SouthEast PA

Re: flip's Unix noob adventures

Postposted on Wed Dec 17, 2008 8:00 am

Buub, thanks.

Forge, I get "ping: cannot resolve msn.com: Host name lookup failure"

Can someone explain this section from the resolv.conf man page:
On a normally configured system this file should not be necessary. The only name server to be queried will be on the local machine, the domain name is determined from the host name, and the domain search path is constructed from the domain name.


I am even more of a DNS noob than a *nix noob. Why would the local machine normally be the machine to be querried? I thought querries were always made to a nameserver?
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Wed Dec 17, 2008 1:43 pm

First, what are the DNS servers your ISP has given you?

In it's simplest form, you would just add a "nameserver" line for each of those. You can get fancier by telling it what sort of partial domain names you would like it to try to attach to hostnames, but that's optional.

So to get started, do something like this in /etc/resolv.conf with the DNS servers your ISP has given you:
Code: Select all
nameserver 1.2.3.4
nameserver 1.2.3.5


The rest of what you're describing sounds baffling to me. I can only guess that it either means a machine that doesn't have a network connection, or a machine that runs its own DNS server.
Buub
Maximum Gerbil
Silver subscriber
 
 
Posts: 4214
Joined: Sat Nov 09, 2002 11:59 pm
Location: Seattle, WA

Re: flip's Unix noob adventures

Postposted on Wed Dec 17, 2008 2:29 pm

Buub wrote:The rest of what you're describing sounds baffling to me. I can only guess that it either means a machine that doesn't have a network connection, or a machine that runs its own DNS server.
Sounded strange to me too but it is directly from the resolv.conf man page.
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Wed Dec 17, 2008 2:54 pm

flip-mode wrote:
Buub wrote:The rest of what you're describing sounds baffling to me. I can only guess that it either means a machine that doesn't have a network connection, or a machine that runs its own DNS server.
Sounded strange to me too but it is directly from the resolv.conf man page.

The resolv.conf should look like this if you're behind a router:
nameserver 192.168.1.1


Why DHCP isn't handling it though is you're real concern. You are using DHCP?
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: flip's Unix noob adventures

Postposted on Wed Dec 17, 2008 4:48 pm

flip-mode wrote:
Buub wrote:The rest of what you're describing sounds baffling to me. I can only guess that it either means a machine that doesn't have a network connection, or a machine that runs its own DNS server.
Sounded strange to me too but it is directly from the resolv.conf man page.


As titan noted, maybe they're asserting that DHCP should be configuring this automatically.
Buub
Maximum Gerbil
Silver subscriber
 
 
Posts: 4214
Joined: Sat Nov 09, 2002 11:59 pm
Location: Seattle, WA

Re: flip's Unix noob adventures

Postposted on Wed Dec 17, 2008 6:17 pm

flip-mode wrote:Can someone explain this section from the resolv.conf man page:
On a normally configured system this file should not be necessary. The only name server to be queried will be on the local machine, the domain name is determined from the host name, and the domain search path is constructed from the domain name.

I am even more of a DNS noob than a *nix noob. Why would the local machine normally be the machine to be querried? I thought querries were always made to a nameserver?

A typical basic resolv.conf has a "domain" entry, "search" entry and a "nameserver" entry. Based on that manpage's wording, the implied configuration would be:
1) local machine runs a caching named (local caching DNS server, typically bind -- named_enable="YES" in rc.conf)
2) DNS queries go to the local caching name server (it has a list of the 13 root servers and can do recursive resolving itself)
3) The local machine's hostname is a fully qualified domain name
4) Queries for unqualified hostnames ("foo" rather than "foo.bar.com") use the domain suffix determined from this machine's FQDN

The wording is telling you how it gets those three components (domain, search and nameserver) when resolv.conf is empty. I'd only quibble with the implication that running local DNS server is a property of "normally configured systems," although it's not a bad idea.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: flip's Unix noob adventures

Postposted on Wed Dec 17, 2008 9:13 pm

titan wrote:The resolv.conf should look like this if you're behind a router:
nameserver 192.168.1.1
Why DHCP isn't handling it though is you're real concern. You are using DHCP?
That is exactly what my resolv.conf looks like. And yes, both adapters are configured for DHCP in rc.conf

Pinging the router works just fine.

Maybe something in my router's settings? I haven't really screwed with anything in there.
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Thu Dec 18, 2008 10:27 am

I always use:

nameserver 4.2.2.1
nameserver 4.2.2.2
nameserver 4.2.2.3

On all my machines.
Siglessness is boring.
Image - M4800-Eight1
Image - Vargr-Z97
Forge
Lord High Gerbil
Silver subscriber
 
 
Posts: 8059
Joined: Wed Dec 26, 2001 7:00 pm
Location: SouthEast PA

Re: flip's Unix noob adventures

Postposted on Thu Dec 18, 2008 2:08 pm

flip-mode wrote:
titan wrote:The resolv.conf should look like this if you're behind a router:
nameserver 192.168.1.1
Why DHCP isn't handling it though is you're real concern. You are using DHCP?
That is exactly what my resolv.conf looks like. And yes, both adapters are configured for DHCP in rc.conf

Pinging the router works just fine.

Maybe something in my router's settings? I haven't really screwed with anything in there.


Yes, that could very well be the case. Do you have a router that does NAT and gives out DHCP addresses? Or is your ISP giving you separate DHCP addresses for each of your machines?
Buub
Maximum Gerbil
Silver subscriber
 
 
Posts: 4214
Joined: Sat Nov 09, 2002 11:59 pm
Location: Seattle, WA

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 9:47 am

OK, I discovered something. Running netstat -rn shows that I have no default gateway configured! Could that be the problem?
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 9:51 am

Yep! That was it! Damn, that only took 4 days to figure out. It seems quite odd to me that such a setting would not be stored in resolv.conf

For that matter, why not store it all in rc.conf?
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 12:26 pm

If you are using DHCP then DHCP should populate your IP, netmask, DNS servers and default gateway. It can also do a bunch more but that's what you should be getting. If your default gateway is not getting set off of DHCP then you should look in to that.
notfred
Grand Gerbil Poohbah
 
Posts: 3762
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 1:02 pm

flip-mode wrote:Yep! That was it! Damn, that only took 4 days to figure out. It seems quite odd to me that such a setting would not be stored in resolv.conf

The gateway settings wouldn't be stored in resolv.conf because they really aren't related to DNS. Gateway settings are just a basic issue of network routing.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 1:58 pm

Thanks BV, NF.

Not using DHCP here at work.

I have learned that using route add default xxx.xxx.xxx.xxx is only temporary and that I should add defaultrouter="xxx.xxx.xxx.xxx" in rc.conf to configure a default gateway. But adding that option does not seem to work at all! Any help?
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 2:02 pm

flip-mode wrote:Thanks BV, NF.

Not using DHCP here at work.

I have learned that using route add default xxx.xxx.xxx.xxx is only temporary and that I should add defaultrouter="xxx.xxx.xxx.xxx" in rc.conf to configure a default gateway. But adding that option does not seem to work at all! Any help?


Remember that rc.conf (or should that be rc.conf.local?) is only read at boot time. Changing stuff in there won't have any effect until the next time you boot.

So yes, if you add that to rc.conf, you will also have to manually set it unless you reboot.
Buub
Maximum Gerbil
Silver subscriber
 
 
Posts: 4214
Joined: Sat Nov 09, 2002 11:59 pm
Location: Seattle, WA

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 2:14 pm

Yeah, that stuff is generally configured at boot, but in FreeBSD you can run /etc/rc.d/routing restart to have it re-read the gateway settings from rc.conf.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 2:24 pm

Buub, BV,

I tried both manual restart with /etc/rc.d/routing stop and then a start and also a netif restart and I also tried rebooting. Neither worked. It is pretty frustrating :(
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 2:33 pm

So, I'm confused. Earlier you said "both adapters are configured for DHCP in rc.conf" but now you say you're "not using DHCP here at work"? If you are using DHCP, that can futz with your gw settings. Otherwise, see what the output of "sh -v /etc/rc.d/routing restart" is.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 2:39 pm

BV, I have a computer at home that is, currently, dual DHCP.

The computer at work is a single static NIC. I am at work right now, working on the single NIC machine.
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 2:43 pm

Ah, then what is the output of "sh -v /etc/rc.d/routing restart"?
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 4:39 pm
Location: Mountain View, CA

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 3:25 pm

Starting near the end of the file:
Code: Select all
#This file now contains just the overrides from /etc/defaults/rc.conf
gateway_enable="no"
hostname="bsdbox"
ifconfig_bge0="inet 10.1.1.240 netmask 255.255.255.0"
sshd_enable="yes"
# -- sysinstall generated deltas -- # Sun Nov 16 18:25:29 2008
moused_type="microsoft"
moused_enable="no"
defal S.H.I.7____N E V E R M I N D


It helps if one spells "default" properly

did a /etc/netstart start after learning to spell and now pings to the internet are successful! :oops:

Thanks for the handhold BV.
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Fri Dec 19, 2008 9:34 pm

Just did my first successful install ever! Pine was what I installed. :P I am just a little happy about it. This is on the home machine by the way. I came home and added a defaultrouter line in rc.conf also and I saw things getting downloaded during the Pine install so I am glad I got a connection to the internet working. Yay!

Now with Pine installed I'll try to get some SMTP action going on so I can start emailing info from the FreeBSD system such as configuration files or output from stuff like dmesg or ifconf to my Windows machine and then be able to post it when asking questions.

You have all been helpful and patient and I do appreciate it and just wanted to say it.
flip-mode
Gerbil Khan
Silver subscriber
 
 
Posts: 9096
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: flip's Unix noob adventures

Postposted on Sat Dec 20, 2008 2:31 am

flip-mode wrote:You have all been helpful and patient and I do appreciate it and just wanted to say it.

We all remember how frustrating *nix was for us when we first started using it. And *nix will never replace Windows as the primary desktop of choice unless we're helpful. So, really, we're not doing it to be nice, but, rather, we're doing it to bring our evil plan to fruition!







Ehm, I mean...you're welcome.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

PreviousNext

Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 1 guest