# [Solved]Disable all ports in the kernel?

## Letharion

Here I have a problem with starting mysql: https://forums.gentoo.org/viewtopic-t-726101.html

Azureus can't open local socket either.

I have a wierd problem with not being able to access my local apache server.

Could I have disabled the ports completely in the kernel somehow?Last edited by Letharion on Fri Jan 16, 2009 8:50 am; edited 1 time in total

----------

## paulbiz

Perhaps check your /etc/hosts.allow and /etc/hosts.deny to make sure nothing is wrong. For example in my hosts.allow I have this:

```
ALL: 127.0.0.1, 192.168.0.0/255.255.255.0
```

which should give access to everything from my local machine and local network.

----------

## Letharion

 *paulbiz wrote:*   

> Perhaps check your /etc/hosts.allow and /etc/hosts.deny to make sure nothing is wrong. For example in my hosts.allow I have this:
> 
> ```
> ALL: 127.0.0.1, 192.168.0.0/255.255.255.0
> ```
> ...

 

I don't have either of those files.

I added a hosts.allow with that setting, but it didn't make any difference.

Perhaps it should look different for me? I have a white ip, so it's not in the 192.168-range.

Also, now that I check ifconfig, I don't have a loopback... I can't ping 127.0.0.1. That's probably related, but I have no idea why.

Where does loopback normally spawn from?

----------

## eccerr0r

did you compile your kernel with all TCP/IP support? Does any of your networking utilities work?  Ping?

----------

## paulbiz

 *Letharion wrote:*   

>  *paulbiz wrote:*   Perhaps check your /etc/hosts.allow and /etc/hosts.deny to make sure nothing is wrong. For example in my hosts.allow I have this:
> 
> ```
> ALL: 127.0.0.1, 192.168.0.0/255.255.255.0
> ```
> ...

 

I think the hosts.allow/hosts.deny is part of sys-apps/tcp-wrappers

but it seems you've got more serious problems than this.   :Sad: 

----------

## Letharion

Wasn't to bad after all.

```
ifconfig lo up
```

did the trick. Now the only question that remains is, why isn't this upped during normal init?

Since I use openRC, maybe I should file a bug somewhere?

----------

## cyrillic

 *Letharion wrote:*   

> Now the only question that remains is, why isn't this upped during normal init? 

 

It should be.  By default, net.lo is in the boot runlevel.

You can check like this.

```
# rc-update show 
```

----------

## Letharion

 *cyrillic wrote:*   

>  *Letharion wrote:*   Now the only question that remains is, why isn't this upped during normal init?  
> 
> It should be.  By default, net.lo is in the boot runlevel.
> 
> You can check like this.
> ...

 

I most likely just messed that up then  :Smile:  It's back now anyhow. Thanks

----------

