My university network is changing resolv.conf. How do I prevent that?
up vote
3
down vote
favorite
When I connect to the internet in my university, through a PEAP, MSCHAPv2 protected WPA2 wifi network, it changes my resolv.conf to this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
search ufsc.br
However, when I get home, I can't access the website as it tries to reach a local address which obviously isn't there. I have to manually remove the nameserver/search lines to be able to access it again.
My question is: what process is actually doing this - changing the file as I connect to my university's network? How can I find out which process is doing it and tell it to stop? Or, if this is necessary - how do I automatically roll the file back to an empty version when I leave the university's network?
networking network-manager dns
add a comment |Â
up vote
3
down vote
favorite
When I connect to the internet in my university, through a PEAP, MSCHAPv2 protected WPA2 wifi network, it changes my resolv.conf to this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
search ufsc.br
However, when I get home, I can't access the website as it tries to reach a local address which obviously isn't there. I have to manually remove the nameserver/search lines to be able to access it again.
My question is: what process is actually doing this - changing the file as I connect to my university's network? How can I find out which process is doing it and tell it to stop? Or, if this is necessary - how do I automatically roll the file back to an empty version when I leave the university's network?
networking network-manager dns
You should probably have a look at askubuntu.com/questions/907246/â¦
â vidarlo
May 2 at 18:32
1
This seems to be the same problem as askubuntu.com/q/58781/696245
â Arpit Jain
May 2 at 18:34
I'll take a look at the second one but the first one seems to break VPN functionality for some users, something I also use (the University's VPN).
â Peterson Silva
May 5 at 2:22
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
When I connect to the internet in my university, through a PEAP, MSCHAPv2 protected WPA2 wifi network, it changes my resolv.conf to this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
search ufsc.br
However, when I get home, I can't access the website as it tries to reach a local address which obviously isn't there. I have to manually remove the nameserver/search lines to be able to access it again.
My question is: what process is actually doing this - changing the file as I connect to my university's network? How can I find out which process is doing it and tell it to stop? Or, if this is necessary - how do I automatically roll the file back to an empty version when I leave the university's network?
networking network-manager dns
When I connect to the internet in my university, through a PEAP, MSCHAPv2 protected WPA2 wifi network, it changes my resolv.conf to this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
search ufsc.br
However, when I get home, I can't access the website as it tries to reach a local address which obviously isn't there. I have to manually remove the nameserver/search lines to be able to access it again.
My question is: what process is actually doing this - changing the file as I connect to my university's network? How can I find out which process is doing it and tell it to stop? Or, if this is necessary - how do I automatically roll the file back to an empty version when I leave the university's network?
networking network-manager dns
edited May 2 at 18:43
Arpit Jain
456
456
asked Apr 19 at 14:57
Peterson Silva
91114
91114
You should probably have a look at askubuntu.com/questions/907246/â¦
â vidarlo
May 2 at 18:32
1
This seems to be the same problem as askubuntu.com/q/58781/696245
â Arpit Jain
May 2 at 18:34
I'll take a look at the second one but the first one seems to break VPN functionality for some users, something I also use (the University's VPN).
â Peterson Silva
May 5 at 2:22
add a comment |Â
You should probably have a look at askubuntu.com/questions/907246/â¦
â vidarlo
May 2 at 18:32
1
This seems to be the same problem as askubuntu.com/q/58781/696245
â Arpit Jain
May 2 at 18:34
I'll take a look at the second one but the first one seems to break VPN functionality for some users, something I also use (the University's VPN).
â Peterson Silva
May 5 at 2:22
You should probably have a look at askubuntu.com/questions/907246/â¦
â vidarlo
May 2 at 18:32
You should probably have a look at askubuntu.com/questions/907246/â¦
â vidarlo
May 2 at 18:32
1
1
This seems to be the same problem as askubuntu.com/q/58781/696245
â Arpit Jain
May 2 at 18:34
This seems to be the same problem as askubuntu.com/q/58781/696245
â Arpit Jain
May 2 at 18:34
I'll take a look at the second one but the first one seems to break VPN functionality for some users, something I also use (the University's VPN).
â Peterson Silva
May 5 at 2:22
I'll take a look at the second one but the first one seems to break VPN functionality for some users, something I also use (the University's VPN).
â Peterson Silva
May 5 at 2:22
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
I'd recommend to set a static IP through Network Manager first. Once connected to the network of your university, modify the settings going to the IPv4 tab and choosing the Manual method. Press the Add button and add your static IP.
Example:
IP 192.168.x.xxx
Netmask 255.255.255.0
Gateway 192.168.x.x
Save your new configuration
To know your Gateway digit the following command in a terminal:
route -n
The output of the command should be something like this:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.1 0.0.0.0 UG 600 0 0 wlp2s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlp2s0
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
As you can see my Gateway is 192.168.2.1 and the IP you will choose will be a 192.168.2.xxx ( example 192.168.2.100 ).
Disable the systemd-resolved service and stop it:
sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop
Put the following line in the [main]
section of your /etc/NetworkManager/NetworkManager.conf
:
dns=default
Install resolvconf:
sudo apt-get install resolvconf
and edit or create the file /etc/resolvconf/resolv.conf.d/tail
sudo nano /etc/resolvconf/resolv.conf.d/tail
Add Google nameservers (one per line) to the file
nameserver 8.8.8.8
nameserver 8.8.4.4
Save the file pressing Ctrl+O
RESTART YOUR SYSTEM and connect to your network
This will probably break wifi functionality if they're in a University environment that is not wired.
â Thomas Wardâ¦
May 4 at 18:18
@Thomas Ward . Why it should?
â Claudio Taccogna
May 4 at 19:21
@Thomas Ward. I mean, it's my daily wireless configuration and i have no problems at all with it.
â Claudio Taccogna
May 4 at 19:29
I should be able to try that on Monday!
â Peterson Silva
May 5 at 2:19
This didn't work - not because the file was still changed, but because the internet didn't work at all. Maybe Ward was right and it did break wifi functionality.
â Peterson Silva
May 7 at 20:52
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I'd recommend to set a static IP through Network Manager first. Once connected to the network of your university, modify the settings going to the IPv4 tab and choosing the Manual method. Press the Add button and add your static IP.
Example:
IP 192.168.x.xxx
Netmask 255.255.255.0
Gateway 192.168.x.x
Save your new configuration
To know your Gateway digit the following command in a terminal:
route -n
The output of the command should be something like this:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.1 0.0.0.0 UG 600 0 0 wlp2s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlp2s0
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
As you can see my Gateway is 192.168.2.1 and the IP you will choose will be a 192.168.2.xxx ( example 192.168.2.100 ).
Disable the systemd-resolved service and stop it:
sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop
Put the following line in the [main]
section of your /etc/NetworkManager/NetworkManager.conf
:
dns=default
Install resolvconf:
sudo apt-get install resolvconf
and edit or create the file /etc/resolvconf/resolv.conf.d/tail
sudo nano /etc/resolvconf/resolv.conf.d/tail
Add Google nameservers (one per line) to the file
nameserver 8.8.8.8
nameserver 8.8.4.4
Save the file pressing Ctrl+O
RESTART YOUR SYSTEM and connect to your network
This will probably break wifi functionality if they're in a University environment that is not wired.
â Thomas Wardâ¦
May 4 at 18:18
@Thomas Ward . Why it should?
â Claudio Taccogna
May 4 at 19:21
@Thomas Ward. I mean, it's my daily wireless configuration and i have no problems at all with it.
â Claudio Taccogna
May 4 at 19:29
I should be able to try that on Monday!
â Peterson Silva
May 5 at 2:19
This didn't work - not because the file was still changed, but because the internet didn't work at all. Maybe Ward was right and it did break wifi functionality.
â Peterson Silva
May 7 at 20:52
add a comment |Â
up vote
0
down vote
I'd recommend to set a static IP through Network Manager first. Once connected to the network of your university, modify the settings going to the IPv4 tab and choosing the Manual method. Press the Add button and add your static IP.
Example:
IP 192.168.x.xxx
Netmask 255.255.255.0
Gateway 192.168.x.x
Save your new configuration
To know your Gateway digit the following command in a terminal:
route -n
The output of the command should be something like this:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.1 0.0.0.0 UG 600 0 0 wlp2s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlp2s0
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
As you can see my Gateway is 192.168.2.1 and the IP you will choose will be a 192.168.2.xxx ( example 192.168.2.100 ).
Disable the systemd-resolved service and stop it:
sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop
Put the following line in the [main]
section of your /etc/NetworkManager/NetworkManager.conf
:
dns=default
Install resolvconf:
sudo apt-get install resolvconf
and edit or create the file /etc/resolvconf/resolv.conf.d/tail
sudo nano /etc/resolvconf/resolv.conf.d/tail
Add Google nameservers (one per line) to the file
nameserver 8.8.8.8
nameserver 8.8.4.4
Save the file pressing Ctrl+O
RESTART YOUR SYSTEM and connect to your network
This will probably break wifi functionality if they're in a University environment that is not wired.
â Thomas Wardâ¦
May 4 at 18:18
@Thomas Ward . Why it should?
â Claudio Taccogna
May 4 at 19:21
@Thomas Ward. I mean, it's my daily wireless configuration and i have no problems at all with it.
â Claudio Taccogna
May 4 at 19:29
I should be able to try that on Monday!
â Peterson Silva
May 5 at 2:19
This didn't work - not because the file was still changed, but because the internet didn't work at all. Maybe Ward was right and it did break wifi functionality.
â Peterson Silva
May 7 at 20:52
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I'd recommend to set a static IP through Network Manager first. Once connected to the network of your university, modify the settings going to the IPv4 tab and choosing the Manual method. Press the Add button and add your static IP.
Example:
IP 192.168.x.xxx
Netmask 255.255.255.0
Gateway 192.168.x.x
Save your new configuration
To know your Gateway digit the following command in a terminal:
route -n
The output of the command should be something like this:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.1 0.0.0.0 UG 600 0 0 wlp2s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlp2s0
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
As you can see my Gateway is 192.168.2.1 and the IP you will choose will be a 192.168.2.xxx ( example 192.168.2.100 ).
Disable the systemd-resolved service and stop it:
sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop
Put the following line in the [main]
section of your /etc/NetworkManager/NetworkManager.conf
:
dns=default
Install resolvconf:
sudo apt-get install resolvconf
and edit or create the file /etc/resolvconf/resolv.conf.d/tail
sudo nano /etc/resolvconf/resolv.conf.d/tail
Add Google nameservers (one per line) to the file
nameserver 8.8.8.8
nameserver 8.8.4.4
Save the file pressing Ctrl+O
RESTART YOUR SYSTEM and connect to your network
I'd recommend to set a static IP through Network Manager first. Once connected to the network of your university, modify the settings going to the IPv4 tab and choosing the Manual method. Press the Add button and add your static IP.
Example:
IP 192.168.x.xxx
Netmask 255.255.255.0
Gateway 192.168.x.x
Save your new configuration
To know your Gateway digit the following command in a terminal:
route -n
The output of the command should be something like this:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.1 0.0.0.0 UG 600 0 0 wlp2s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlp2s0
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
As you can see my Gateway is 192.168.2.1 and the IP you will choose will be a 192.168.2.xxx ( example 192.168.2.100 ).
Disable the systemd-resolved service and stop it:
sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop
Put the following line in the [main]
section of your /etc/NetworkManager/NetworkManager.conf
:
dns=default
Install resolvconf:
sudo apt-get install resolvconf
and edit or create the file /etc/resolvconf/resolv.conf.d/tail
sudo nano /etc/resolvconf/resolv.conf.d/tail
Add Google nameservers (one per line) to the file
nameserver 8.8.8.8
nameserver 8.8.4.4
Save the file pressing Ctrl+O
RESTART YOUR SYSTEM and connect to your network
answered May 4 at 15:30
Claudio Taccogna
19418
19418
This will probably break wifi functionality if they're in a University environment that is not wired.
â Thomas Wardâ¦
May 4 at 18:18
@Thomas Ward . Why it should?
â Claudio Taccogna
May 4 at 19:21
@Thomas Ward. I mean, it's my daily wireless configuration and i have no problems at all with it.
â Claudio Taccogna
May 4 at 19:29
I should be able to try that on Monday!
â Peterson Silva
May 5 at 2:19
This didn't work - not because the file was still changed, but because the internet didn't work at all. Maybe Ward was right and it did break wifi functionality.
â Peterson Silva
May 7 at 20:52
add a comment |Â
This will probably break wifi functionality if they're in a University environment that is not wired.
â Thomas Wardâ¦
May 4 at 18:18
@Thomas Ward . Why it should?
â Claudio Taccogna
May 4 at 19:21
@Thomas Ward. I mean, it's my daily wireless configuration and i have no problems at all with it.
â Claudio Taccogna
May 4 at 19:29
I should be able to try that on Monday!
â Peterson Silva
May 5 at 2:19
This didn't work - not because the file was still changed, but because the internet didn't work at all. Maybe Ward was right and it did break wifi functionality.
â Peterson Silva
May 7 at 20:52
This will probably break wifi functionality if they're in a University environment that is not wired.
â Thomas Wardâ¦
May 4 at 18:18
This will probably break wifi functionality if they're in a University environment that is not wired.
â Thomas Wardâ¦
May 4 at 18:18
@Thomas Ward . Why it should?
â Claudio Taccogna
May 4 at 19:21
@Thomas Ward . Why it should?
â Claudio Taccogna
May 4 at 19:21
@Thomas Ward. I mean, it's my daily wireless configuration and i have no problems at all with it.
â Claudio Taccogna
May 4 at 19:29
@Thomas Ward. I mean, it's my daily wireless configuration and i have no problems at all with it.
â Claudio Taccogna
May 4 at 19:29
I should be able to try that on Monday!
â Peterson Silva
May 5 at 2:19
I should be able to try that on Monday!
â Peterson Silva
May 5 at 2:19
This didn't work - not because the file was still changed, but because the internet didn't work at all. Maybe Ward was right and it did break wifi functionality.
â Peterson Silva
May 7 at 20:52
This didn't work - not because the file was still changed, but because the internet didn't work at all. Maybe Ward was right and it did break wifi functionality.
â Peterson Silva
May 7 at 20:52
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026424%2fmy-university-network-is-changing-resolv-conf-how-do-i-prevent-that%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You should probably have a look at askubuntu.com/questions/907246/â¦
â vidarlo
May 2 at 18:32
1
This seems to be the same problem as askubuntu.com/q/58781/696245
â Arpit Jain
May 2 at 18:34
I'll take a look at the second one but the first one seems to break VPN functionality for some users, something I also use (the University's VPN).
â Peterson Silva
May 5 at 2:22