There should be nothing you need to do with your BIND configuration. With your DNS being managed through your domain registrar, you should be able to enter a new A Record for crm.company.com
that points to the public IP address of your LAN router.
crm.company.com IN A 12.34.56.789
Apache on your Linux server will need to be configured to handle requests for crm.company.com
as a virtual host if the server is not already assigned that hostname.
You will need to configure your LAN router to open and forward necessary ports (like 80 and 8080 for http and https) to the internal LAN IP address of the Linux server.
This works fine if your LAN router is working with a static public IP address. If your router is using a dynamic public IP address, it gets more complicated and you will need to investigate using a dynamic DNS service like dyn.com to manage the DNS for your crm.company.com
domain and configure your primary DNS to point to the dynamic DNS service for resolving the subdomain.
Edit - based on addtional info from comments
Since you have an intermediate server acting as a router and running BIND that you want to manage resolving a subdomain, and your primary DNS is being managed through your domain registrar, the resolution to your desired configuration gets a little complicated. Registrars rarely support subdomain DNS services, expecting that either you or your hosting provider handle any subdomain delegation.
The simplest solution I can think of for your desired configuration is to, if possible, run BIND on your VPS and have that become the authoritative host for your domain. You would then need to add an A Record in BIND on the VPS server for your intermediate server after giving it a FQDN and hostname (company.local
will not work - it needs to be something like zones.company.com
to be resolvable externally.) An additional PTR Record on the VPS for the crm.company.com
server should also point to your intermediate server. Then BIND on the intermediate server should be set up with a Master Zone for zones.company.com
and add an A Record to it pointing to the LAN IP of the crm
server: crm.company.com IN A 10.1.1.122
You will need to make sure that IPTABLES allows forwarding and pass-through of the ports needed for your CRM system.