Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DNS entry for default gateway (laptop connection monitoring)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jrittenh
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 92

PostPosted: Mon Nov 30, 2009 5:57 am    Post subject: DNS entry for default gateway (laptop connection monitoring) Reply with quote

I recently started using Link Monitor to track a few different points "out there" either on my local network or across the Internet. My main goal is to have a quick visual reference to tell if I'm: A. connected to a network and B. able to route to the outside world. I'm currently pinging my home router, Google, and the DNS entry for my default gateway when connected to the wired network at work (which is unroutable from outside the network, so I've configured a static DNS entry on my home router to point to itself).

What I'd like to do is have the gateway ping dynamically update its address to ping whatever the current default gateway with the best metric is in the routing table, no matter where I am. I'm thinking a script to update the hosts file dynamically might work, but was hoping the Gentoo community might have a better idea (or a workable script) as I don't really want to take the time to write a script to parse the hosts file, find a specific line, and replace the IP if something exists that can do this already. If I need to run something like dnsmasq I'm not opposed to that but I'd prefer to have something using nscd and the routing table and little else. If someone has a script to dynamically update a single line in the /etc/hosts file already I'd be happy with that, but if there's a way to just point nscd at the routing table I'd be even happier...I'm just not familiar enough with Linux networking tools to know if this is possible without the script facilitating things...nscd seems to be pretty basic, so I'm guessing it's just not that smart...I'm hoping someone can tell me otherwise, or have a different solution.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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