Replace IP with Name

If we want to replace IP address with a specific name on client computer then we can do this by this.

by this , the user open specific name on client computer instead to remember and type IP address. 

Step 1: Install dnsmasq on your koha server 

run following Commands in Terminal 

sudo apt update 

sudo apt install dnsmasq -y

Step 2: Configure dnsmasq 

1. Open the configuration file

sudo nano /etc/dnsmasq.conf

2. add following line at the bottom 

address=/koha.local/10.0.34.**

replace 10.0.34.** with your koha server's actual ip

3. Save and exit (ctrl + x, then Y, then Enter)


Step 3: Restart dnsmasq 

sudo systemctl restart dnsmasq 

To check if it's running

sudo systemctl status dnsmasq

 

Step 4: Configure Network Clients (computer & mobile devices)

To make other devices use your Koha server as their DNS resolver, follow these steps:

For Windows Clients
a. Go to Control Panel → Network and Internet → Network Connections.
b. Right-click on your Wi-Fi or Ethernet connection → Properties.
c. Select Internet Protocol Version 4 (TCP/IPv4) → Properties.
d. Choose Use the following DNS server addresses and enter

Preferred DNS server: 10.0.34.X   (Koha Server IP)
Alternate DNS server: 8.8.8.8     (Google DNS, optional)

Click OK and restart the computer.

 

For Mobile Phones (Android/iOS)
Go to Wi-Fi settings.
Select your connected network and edit the DNS settings.
Change the DNS server to your Koha server’s IP (10.0.34.X).

 

Step 5: Test the Setup

On any client computer, open Command Prompt (Windows) or Terminal (Linux/Mac) and type:

ping koha.local


-----------------
If ERROR 
when run sudo systemctl restart dnsmasq Job for dnsmasq.service failed because the control process exited with error code. See "systemctl status dnsmasq.service" and "journalctl -xeu dnsmasq.service" for details.

 

Step 1: Check Status of dnsmasq

sudo systemctl status dnsmasq

This will show any errors. Look for messages like "failed to start" or "address already in use".

Step 2: Check Logs for More Details

journalctl -xeu dnsmasq.service

This will display detailed logs of why dnsmasq failed.

Step 3: Check for Port Conflicts

dnsmasq runs on port 53. If another DNS service (like systemd-resolved) is using this port, dnsmasq won’t start.

sudo netstat -tulnp | grep :53

If you see something like:

udp 0 0 127.0.0.53:53 0.0.0.0:* 1234/systemd-resolv

Then systemd-resolved is using port 53. We need to disable it.

Step 4: Disable systemd-resolved (If Needed)

If systemd-resolved is causing conflicts, disable it:

sudo systemctl disable --now systemd-resolved

Then restart dnsmasq:

sudo systemctl restart dnsmasq 

Step 5: Validate Your Configuration

If the issue persists, check your dnsmasq.conf file:

sudo nano /etc/dnsmasq.conf

Make sure the following line is correct:

address=/koha.local/10.0.34.**
No extra spaces 
 

Save and exit (Ctrl + X, then Y, then Enter).

Restart dnsmasq:

sudo systemctl restart dnsmasq

Step 6: Check for Errors Again

If it still fails, rerun:

sudo systemctl status dnsmasq

--------------------

 







 

 

 

 

Steps (for Windows Clients)

1. Open Notepad as Administrator (right click on Notepad and run as Administrator)

2. Open the file (from this location) C: \Windows\Systems\drivers\etc\hosts

3. Add an entry like this at the bottom: (dont give any space before 10.0.34.#)

10.0.34.#        koha.opac

4. Save the file

5. Now, Users can access koha using http://koha.opac instead of the IP address


No comments:

Post a Comment

Total Pageviews