Is it possible to configure an OpenWrt access point as a DHCP client of my main router but still be able to share hostnames mapping to the AP clients?
My simplified network looks like this:
Main Router ---- PC
| |
| |--))) Server
|
WiFi AP ---))) Printer
|
|--))) Smartphone
Legend:
--- LAN
--))) Wireless
The problem is that my main router doesn't let for loopbacks. My server is visible outside the network as example.com and when I'm trying to reach it from within my LAN then example.com is unreachable.
What I want to achieve is:
The PC sees the printer
The smartphone when connected to the AP sees the Server using example.com
I have just installed OpenWRT on the AP but failed with DHCP configuration and left it just as a dummy DHCP client for the main router so now every guy see other guys but only using LAN addresses.
@lleachii
Ah, I forgot to mention that my main router is delivered to me by my ISP and is very poor in features. It doesn't have a possibility of hosts mapping sharing. I can only forward ports on it and enable/disable DHCP. That's it...
In case someone seeks any details. I have a UPC Horizon box which appeared to be working with disabled DHCP only when having 192.168.1.1 static IP address. Any other IP or even assigning it a hostname in its settings makes it undiscoverable by other devices.
So I assigned the main router the static IP and disabled DHCP on it. Then went into AP's OpenWRT settings. Also assigned a static IP to it. Enabled DHCP. Gateway set to the main router's IP.
Then I logged to the AP through SSH and added hosts mapping to the hosts file in \etc\ folder.
Thanks to this setup all devices connected to the main router and to the AP with OpenWRT can communicate with each other and my server is reachable to all devices within the local network by example.com.