Skip to content
forked from dvob/nss-xhosts

NSS Module which supports wildcards

Notifications You must be signed in to change notification settings

svagner/nss-xhosts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xhosts

xhosts is a NSS module which resolves host names. It is similar to the default files module which reads records from /etc/hosts but it allows to configure wildcard records.

Example

  • /etc/xhosts
# local k8s test
*.cluster.local 172.18.0.2

# other entry
other.foo.com 192.168.1.1

Installation

  • Build the code and install the shard library libnss_xhosts.so.2 in your library path:
./install.sh
  • Add xhosts to your hosts configuration in /etc/nsswitch.conf:
hosts:          files xhosts dns
  • Create the file /etc/xhosts and add your records:
*.cluster.local 172.18.0.2

About

NSS Module which supports wildcards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 93.8%
  • Shell 6.2%