# [SOLVED]Connected but no internet connection(ethernet)

## C666PO

Greetings,

I've finished the installation of Gentoo for the first time, everything was working very well, however i'm not sure why but i don't have an internet connection.(Keep in mind that i had an internet connection when i booted gentoo for the 1st time after the instllation.)

The network manager shows that i'm connected, i checked ifconfig and i have a local ip, i checked another machine and it has a normal internet connection. I restarted dhcpcd and network manager.

The only thing i did that can remember before having this issue was a system update and a reboot. I don't know what else to try. 

Any help would be appreciated.

Thanks.Last edited by C666PO on Mon Dec 02, 2019 12:44 am; edited 2 times in total

----------

## charles17

 *C666PO wrote:*   

> ... I restarted dhcpcd and network manager. ...

 

But you are not telling us you were running dhcpcd and NetworkManager both as a service

----------

## C666PO

Hello

I believe i did not express myself well.

I was using networkmanager but since it was not working i tried dhcpcd. One at a time and then both at the sametime. The result is the same. 100% packet loss when i ping 8.8.8.8

Kind regards,

----------

## NeddySeagoon

C666PO,

When the ping fails, what is the output of 

```
ifconfig -a
```

and 

```
route -n
```

You will ned so save the output to files, then post the file.

```
ifconfig -a > ifconfig.txt 

route -n > route.txt
```

Then post the two .txt files.

----------

## C666PO

Hi Neddy,

Thank you for the help.

ifconfig.txt - https://textuploader.com/1ohb9

route.txt - https://textuploader.com/1ohb0

With thanks and regards,

----------

## NeddySeagoon

C666PO,

That looks OK.

```
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         192.168.1.1     0.0.0.0         UG    2      0        0 eno1
```

Your router is at 192.168.1.1.

Your ifconfig 

```
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.41  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::36a3:922b:6813:2ebe  prefixlen 64  scopeid 0x20<link>

        inet6 fe80::896:ae5c:c489:f77  prefixlen 64  scopeid 0x20<link>
```

shows an IPv4 address in 192.168.1.41 the 192.168.1.0/24 subnet.

and two non public self assigned IPv6 addresses.

Does 

```
ping 192.168.1.1
```

work.  That's your router.

If that's OK, try 

```
ping 216.58.198.174
```

 that's google.com

If both steps work, what do you have in /etc/resolv.conf ?

----------

## C666PO

Hi Neddy,

Apparently I am unable to ping the router 192.168.1.1

This is my resolv.conf - https://textuploader.com/1oxtq

I have no clue how to go from here. I checked my router and it recognizes my Gentoo machine with the the correct IP 192.168.1.41 and if DHCP assigned the ip how is a connection to the router impossible ?

Thanks for the help.

Kind regards,

----------

## NeddySeagoon

C666PO,

Your network worked briefly ...

```
        RX packets 3411  bytes 779730 (761.4 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 125  bytes 10380 (10.1 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

When your network is not working, save dmesg to a file

```
dmesg > dmesg.txt
```

Put that saved file onto a pastebin site please.

----------

## C666PO

 *NeddySeagoon wrote:*   

> C666PO,
> 
> Your network worked briefly ...
> 
> ```
> ...

 

I did notice that on the networkmanager interface. Every 5/10 seconds i see " download - few kb/s or bytes and then 0. I tried to ping the router for a minute or so to see if at least some packets were able to reach it but no luck. 100% packet loss.

As requested, once i saw the networkmanager-download with a few numbers i entered the command.

https://pastebin.com/raw/ZKRVBTyF

With thanks and regards,

----------

## NeddySeagoon

C666PO,

Here is your nic coming to life.

```
[    1.621911] e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC clock

[    1.704146] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) 00:1f:c6:9c:3f:60

[    1.704176] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection

[    1.704264] e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: FFFFFF-0FF

...

[    4.202489] e1000e 0000:00:1f.6 eno1: renamed from eth0

...

[    6.340830] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready

[    6.548228] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready

[   12.772870] e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
```

If your link was flapping there would be lots of messages about link up, link down ... but there are none.

You mentioned NetworkManager. Maybe you have several things trying to mange your network. That always ends badly.

What does 

```
rc-update -v show
```

tell?

----------

## C666PO

 *NeddySeagoon wrote:*   

> 
> 
> What does 
> 
> ```
> ...

 

Here it is: https://pastebin.com/raw/GJVHJXp7

With thanks and regards,

----------

## NeddySeagoon

C666PO,

You have several things trying to manage your network.

```
NetworkManager |      default 

      net.eno1 |      default
```

They are unaware of each other and both are trying to manage the interface.

Pick one.

Even better for diagnostics is to remove both from the default runlevel and reboot.

eno1 should not get an IP. That's expected and demonstrates that your network is not starting because you have not asked it to.

The command 

```
dhcpcd eno1
```

should make it work until your lease expires. It will be long enough for testing.

If you get here and it works as expected, add one of the interface controllers back to the default runlevel.

----------

## transpetaflops

He also has the ufw firewall enabled. Perhaps it's missing a proper config file? I'd disable that service during the tests.

```
rc-service ufw stop
```

----------

## NeddySeagoon

transpetaflops,

Well caught!

Thank you.

----------

## C666PO

Hi NeedySeagoon, Transpetaflops...

I still can't believe this but it's now working.

I saw Transpetaflops comment about the UFW. Stopping the service didn't work because the service was already stopped. I enabled the service " rc-update add ufw default " after the gentoo installation but for some reason, the service was unable to start automatically with OpenRC, i had to start it manually with " rc'service ufw start ". This was another problem i would eventually discuss in another topic.

Still, i disabled the service " rc-update del ufw ", rebooted the system and once the machine turned on i could ping the router, and had internet connection. However, i don't really want to stay without a firewall. What are my options at this point ?

Thank you both!!!

Kind regards,

----------

## UberLord

 *C666PO wrote:*   

> However, i don't really want to stay without a firewall.

 

Firewalls are over-rated.

My router uses one mainly for NAT, none of my other machines do.

If you don't want the world to access a something then don't run it.

----------

## krinn

 *UberLord wrote:*   

> Firewalls are over-rated.

 

I'm glad this comes from you, as it might be controversial to say that

No firewall would protect users from badly configure/insecure services anyway

And today i think 80% (not a real number, my own estimate) of users have a router with NAT, and if users doesn't put a computer in DMZ, users should be safe.

It would be better if users with NAT forward to the proper port and host a needed service (which for most users might be sshd) rather than using a firewall with an overly expose computer for nothing in DMZ.

And of course even better if no services are expose at all.

----------

## NeddySeagoon

krinn,

I'm mostly with UberLord.  

Your average domestic half open firewall is useless for protection with Gentoo as you don't run services you don't care about. 

Therefore there is nothing listening for incoming connections that you don't know about.

If a non root nasty does get in ,a firewall blocking outgoing connections can make it more difficult for the nasty to phone home.

My outgoing firewall logs are cluttered with Android trying to phone home for I don't know what for. It all seems to work as intended, so I guess its Google spyware.

Yep, I'm paranoid. :)

If a root nasty gets in, its game over. It can do what it wants.

----------

## C666PO

I still prefer to have a firewall on my machine. I like to play safe. A few years ago i was able to hack my own wifi with a simple tutorial on the internet which is scary, it means that any 6 year old kid can go to youtube watch a video and enter a network. If the network is compromised i need to be sure that my machines are not. My router is from the ISP, it's horrible and the ISP provides support exclusively for their devices.

Anyway this will be a discussion for another topic.

Thank you so much for your help!

Kind regards.

----------

## Tony0945

 *C666PO wrote:*   

> IAnyway this will be a discussion for another topic.

 

Great suggestion! Please open a thread on Gentoo Chat.

----------

## UberLord

 *C666PO wrote:*   

> I still prefer to have a firewall on my machine. I like to play safe. A few years ago i was able to hack my own wifi with a simple tutorial on the internet which is scary, it means that any 6 year old kid can go to youtube watch a video and enter a network. If the network is compromised i need to be sure that my machines are not. My router is from the ISP, it's horrible and the ISP provides support exclusively for their devices

 

I don't trust anything on my own network either.

With the plethora of IoT devices who really knows what they're doing or how secure they are?

But I also love their functionality and ease of use - I can't imagine living at home without a chromecast, fitbit scales, my phone, the kids tablets - all devices beyond my control.

Whose to say that that your 6 y old kid can't find a you tube video to hack one of these devices remotely? They don't even need to be on your network directly - might as well have an open network at this point.

BOOM!

----------

