How to disable DHCP non authenticated

Chat about anything related to Linux Mint
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Locked
lisabonne citadel

How to disable DHCP non authenticated

Post by lisabonne citadel »

GRAB YOUR NETWORK DEVICE ID WITH sudo ifconfig

go to etc/network/interfaces.txt

open with root access and add this entry to put static ip address on ipv4 and ipv6 connections

auto YOUR DEVICE ID
iface YOUR DEVICE ID inet static
address 127.0.0.1
netmask 255.255.255.0
gateway 127.0.0.254

iface YOUR DEVICE ID inet6 static
address ::1/128
netmask 64
gateway ::1/128

disable your network connection on panel and enable it again
result is simple ... AWESOMOUS!!


IT SEEMS AFTER REBOOT you dont be able to start your network connection.
to solucionate copy the interface file to somewhere inside of your home directory per example /Documents/STATIC
and put other interface file with default values on /Documents/NON_STATIC

now create 2 script files, one for static and another for non_static > its only two documents files with sh extension on the name

for STATIC.sh
lxterminal -e 'bash -c "sudo /bin/cp -rf /home/mint/Documents/STATIC/interfaces /etc/network/interfaces;bash"'

for NON_STATIC.sh FOR SHUTDOWN in 10 seconds after you prompt your password
lxterminal -e 'bash -c "sudo /bin/cp -rf /home/mint/Documents/NON_STATIC/interfaces /etc/network/interfaces;sleep 10s; shutdown -h now;bash"'

for NON_STATIC2.sh FOR REBOOT in 10 seconds after you prompt your password
lxterminal -e 'bash -c "sudo /bin/cp -rf /home/mint/Documents/NON_STATIC/interfaces /etc/network/interfaces;sleep 10s; shutdown -r now;bash"'

per example in cinnamon you can use command launcher applet in panel to apply the shutdown and reboot functions and at the same time put interface with default configuration... when you reboot you can apply static script in another command launcher :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Chat about Linux Mint”