September 22, 2022

K3s Rancher Installation Note

Bulk remove containers/images

docker stop $(docker ps -a -q) 
docker rm $(docker ps -a -q)  
docker rmi $(docker images -a -q) 

Dashboard "404 page not found"

docker run -d --privileged --restart=unless-stopped -p 80:80 -p 443:443
Those are occupied common port, we may use some other port (8081:80,9443:433) to bypass

Reset rancher login password

docker exec -ti <container_id> reset-password

change root password

echo root:imafish | chpasswd

==============

sudo iptables -t nat -A PREROUTING -p tcp --dport 53 -j DNAT --to-destination 127.0.0.53:30001


sudo iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination 127.0.0.53:30001



sudo iptables -D -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination 127.0.0.1:30001


sudo iptables -t nat -v -L PREROUTING -n --line-number

sudo iptables -t nat -D PREROUTING


sudo iptables -I INPUT -p tcp -m tcp --dport 53 -j ACCEPT

sudo iptables -I INPUT -p udp -m udp --dport 53 -j ACCEPT


sudo iptables -S --line-number


Free port 53

https://www.linuxuprising.com/2020/07/ubuntu-how-to-free-up-port-53-used-by.html

No comments:

Post a Comment