# I messed my connection with a new kernel



## Ricky (Jun 14, 2012)

Hi,

I'm having some problems setting up my connection properly on FreeBSD 8.3 Every thing I do leads to host lookup name failure when I ping. Have no idea why this is happening. I removed my connection from router. Then I ran *sysinstall* but it doesn't work

*M*y /etc/hosts

```
::1 localhost localhost.lan
127.0.0.1 localhost localhost.lan
192.168.1.73 webserver.lan webserver
192.168.1.73 webserver.lan.
```

/etc/resolv.conf

```
search lan
nameserver 192.168.1.254
nameserver 192.168.1.254
```

/etc/rc.conf

```
ifconfig_em0="DHCP"
hostname="webserver.lan"
```

I can see the machine on the router interface.

When I try to ping 192.168.1.254 I get:

```
ping: sendto: Permission denied
```

And http://www.google.com

```
ping: can't resolve [url]www.google.com[/url]. Host lookup name failure
```

All this started happening when I compiled a new kernel. The options in the FreeBSD Kernel Handbook  weren't working. When I tried to [cmd=]#make buildkernel KERNCONF=MYKERNEL[/cmd] it says 
	
	



```
Stop. Don't know how to build kernel.
```

I searched for a while on google and figured out an command that works

```
#cd /usr/src/sys/i386/conf
#cp GENERIC MYKERNEL
#config MYKERNEL
#cd ../compile/MYKERNEL
#make depend
#make install
```

After that my connection starts going insane and I can't compile a new kernel again. When I [cmd=]#make install[/cmd] it says:

```
You must build a kernel first.
Error code 1.
```

Someone can figure out what is going on?


----------



## kpa (Jun 14, 2012)

Read the handbook again, the procedure for building and installing world/kernel is documented here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html


----------



## Ricky (Jun 14, 2012)

kpa said:
			
		

> Read the handbook again, the procedure for building and installing world/kernel is documented here:
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html



Oh, I figured out that I didn't had all the source tree. I'm rebuilding the GENERIC kernel. Thank you for your help.


----------



## wblock@ (Jun 14, 2012)

Ricky said:
			
		

> When I try to ping 192.168.1.254 I get:
> 
> ```
> ping: sendto: Permission denied
> ```



Think firewall for that.


----------



## Ricky (Jun 14, 2012)

The problem was the kernel.
DutchDaemon you may close this thread, and congratulations for being promoted to Administrator 

EDIT: Don't close!
I found out what the problem really was.
If I add 
	
	



```
options IPFIREWALL
```
 in the GENERIC file and then build/install it I got

```
Hoost lookup name failure
```

But if I don't add it, the connection is fine. 

Any solutions?


----------



## SirDice (Jun 15, 2012)

Ricky said:
			
		

> Any solutions?



Yes, configure the firewall you just enabled.


----------



## Ricky (Jun 15, 2012)

Yeah. Now I realized I didn't have any rules to allow the lo0 interface.

But now I have another problem. My kernel stopped working. I tried
[cmd=]load kernel.old[/cmd]
[cmd=]load GENERIC[/cmd]

None of these were found.

DutchDaemon you won't fix my posts anymore because I have learned how to write with proper formatting


----------



## DutchDaemon (Jun 15, 2012)

You need to supply a path to load, e.g. [cmd=]load /boot/kernel.old/kernel[/cmd]


----------

