Skip to content

11_Network

Davood Dorostkar edited this page Oct 13, 2023 · 2 revisions

Enable internet from scratch

  1. check if firewall is successfully disabled:
sudo ufw status
  1. check if port forwarding is successfully enabled:

this must return 1

cat /proc/sys/net/ipv4/ip_forward
  1. find your interface name
ip link show
  1. enable net interface (consider its name is eno1)
sudo ip link set eno1 up
  1. add an ip to your computer (check the available range in router configs)
sudo ip addr add 192.168.1.110/24 dev eno1
  1. add default route to ip table
sudo ip route add default via 192.168.1.1
  1. check if you are connected to the router
ping 192.168.1.1
  1. if you have vim installed skip this step
echo 'nameserver 8.8.8.8' >> /etc/resovl.conf
echo 'nameserver 8.8.4.4' >> /etc/resovl.conf
  1. edit DNS settings (if you have vim)
sudo vim /etc/resovl.conf

add this to the file (this is google dns, you can choose another one)

nameserver 8.8.8.8
nameserver 8.8.4.4
  1. check if you are connected
ping google.com
Clone this wiki locally