View previous topic :: View next topic |
Author |
Message |
nxjoseph n00b
Joined: 05 Mar 2023 Posts: 13
|
Posted: Sun Mar 05, 2023 1:38 pm Post subject: [SOLVED] I can't connect to network on custom kernel |
|
|
Hello.
My computer is connected to router through an ethernet cable and my computer gets local IP, but I can't connect to network.
gives the error below
Code: |
Temporary failure in name resolution
|
I have disabled ipv6 in my kernel. I have enabled ehernet driver in kernel config.
Ethernet driver loaded as built in. My kernel does not use initrd.
Last edited by nxjoseph on Sun Mar 05, 2023 2:46 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sun Mar 05, 2023 1:50 pm Post subject: |
|
|
nxjoseph,
Code: | Temporary failure in name resolution | suggests lots of things.
Does show your interface with an IP address?
Code: | roy@femail-clone ~ $ ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.186 netmask 255.255.255.0 broadcast 192.168.122.255
... |
The inet line.
What about a route, you need a default route?
Code: | $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.122.1 0.0.0.0 UG 0 0 0 eth0 |
Lastly, you need /etc/resolv.conf populated with a working nameserver.
Code: | nameserver 192.168.122.1 |
If /etc/resolv.conf is empty, Code: | $ ping google.com
PING google.com (172.217.16.206) 56(84) bytes of data.
64 bytes from fra16s08-in-f14.1e100.net (172.217.16.206): icmp_seq=1 ttl=118 time=5.22 ms | will fail but
Code: | $ ping 172.217.16.206 | will work as no nameserver is required. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
nxjoseph n00b
Joined: 05 Mar 2023 Posts: 13
|
Posted: Sun Mar 05, 2023 1:57 pm Post subject: |
|
|
Yes, interface gets a local IP.
Code: |
$ ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255
ether 3c:7c:3f:ba:42:04 txqueuelen 1000 (Ethernet)
RX packets 221 bytes 21851 (21.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 225 bytes 19950 (19.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.2.1 0.0.0.0 UG 1002 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 1002 0 0 eth0
$ cat /etc/resolv.conf
# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
domain lan
nameserver 192.168.2.1
# /etc/resolv.conf.tail can replace this line
$ lspci | grep Eth
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sun Mar 05, 2023 2:07 pm Post subject: |
|
|
nxjoseph,
That looks good.
Does Code: | ping 172.217.16.206 | work?
What about
That will be your router, which is your net hop toward the internet. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Last edited by NeddySeagoon on Sun Mar 05, 2023 2:09 pm; edited 1 time in total |
|
Back to top |
|
|
nxjoseph n00b
Joined: 05 Mar 2023 Posts: 13
|
Posted: Sun Mar 05, 2023 2:09 pm Post subject: |
|
|
Great. Let me try this command after booting my custom kernel. I have switched to my old kernel because writing replies on a phone is not comfortable for me.
Edit;
I had ufw running, then i tried disabling it and network is started to work.
after tried enabling ufw, it gave this output below:
Code: |
# ufw enable
ERROR: problem running ufw-init
Warning: Extension limit revision 0 not supported, missing kernel module?
iptables-restore: line 75 failed
Warning: Extension recent revision 0 not supported, missing kernel module?
Warning: Extension limit revision 0 not supported, missing kernel module?
iptables-restore: line 51 failed
Problem running '/etc/ufw/before.rules'
Problem running '/etc/ufw/user.rules'
|
Now, pinging and network are working. Thank you.
I guess ufw was not allowing me to connect to network because of missing drivers that ufw need in kernel.
Edit;
After configuring custom kernel for ufw, it is working successfully.
Code: |
$ ping 172.217.16.206
64 bytes from 172.217.16.206: icmp_seq=1 ttl=113 time=63.0 ms
64 bytes from 172.217.16.206: icmp_seq=2 ttl=113 time=62.6 ms
|
Rebuilding ufw was wanting those configs below too.
Code: |
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
CONFIG_NETFILTER_XT_MATCH_HL=y
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
CONFIG_NETFILTER_XT_MATCH_RECENT=y
CONFIG_NETFILTER_XT_MATCH_STATE=y
|
https://wiki.gentoo.org/wiki/Ufw#Kernel |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|