LAMP with bind

dash-dns
#1

So I decided to buy a domain name, what a mistake, or maybe the people who I bought it from have just made this experience unbearable.

I would like to know if I can host my opencart website from my linux machine using the domain name I purchased from namecheap using a cloudflare DNS ip_address and A records.

So far I can access opencart through local host, however I do know quiet understand how you go from LAN to be able to use the domain name I have purchased and unfortunately NameCheap are useless with their help.

I hope this makes sense and appreciate any help/guidance you can provide.

#2

Is your Linux machine at your house, or is it in a data center?

#3

My apologies, the machine is in my house.

#4

That’s going to be the challenge. Most ISPs block inbound WWW ports (80 and 443).

Did you add your WAN (IP address assigned by your ISP) to Cloudflare DNS?
If you’re not sure what that IP address is, try this command from your Linux box:

wget -qO - ipv4bot.whatismyipaddress.com
#5

Interesting, so that gave me ISP for the internet providers servers, may I ask what is the acronym for adding this to Cloudflare?

#6

I guess, I should also explain, that the DNS ip_address is with Cloudflare, but the reverse DNS is with nameCheap.

$ dig tworiel.cc

; <<>> DiG 9.10.3-P4-Raspbian <<>> tworiel.cc
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49842
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;tworiel.cc.                    IN      A

;; ANSWER SECTION:
tworiel.cc.             300     IN      A       1xx.xx.1xx.1xx
tworiel.cc.             300     IN      A       1xx.xx.1xx.1xx

;; Query time: 1521 msec
;; SERVER: 10.0.0.x#53(10.0.0.x)
;; WHEN: Thu Feb 21 00:49:26 AEST 2019
;; MSG SIZE  rcvd: 71

$ dig -x tworiel.cc

; <<>> DiG 9.10.3-P4-Raspbian <<>> -x tworiel.cc
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2768
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;cc.tworiel.in-addr.arpa.       IN      PTR

;; AUTHORITY SECTION:
in-addr.arpa.           3600    IN      SOA     b.in-addr-servers.arpa. nstld.iana.org. 2xxxxxxxxx  18xx 9xx 6xxxxx 3xxx

;; Query time: 33 msec
;; SERVER: 10.0.0.x#53(10.0.0.x)
;; WHEN: Thu Feb 21 00:53:07 AEST 2019
;; MSG SIZE  rcvd: 120
#7

The IP address you get from the wget command should be an “A” record for example.com and www.example.com (put your actual domain instead of example.com)

1 Like
#8

So I have added my ISP ip_address to the A record and imagine that I will have to wait a while. I will also add it as a forwarder to the bind server. What I’ve read is the ISP becomes the root server for caching.

#9

If you’re all set up on Cloudflare, it should take very long at all for that “A” record to propagate.

What are you forwarding to the BIND server? Once you’re using Cloudflare DNS, your domain’s DNS records are treated like anybody else’s out there. Your ISP won’t become a root DNS server for your domain.

If you’re trying to run any type of business with OpenCart, your best bet is to pay for decent hosting. If you’re already configuring a local Linux box for this, you should be able to handle administering a VPS that’s only going to cost you $5/month. And you won’t be at the mercy of your ISP’s service.

#10

As far as I can comprehend so far. The reverse DNS is the part where it get’s the files to be displayed, is this correct?

#11

No. Reverse DNS is just a backwards phone directory. Type in the IP address, and you see who it belongs to. If you’re using Cloudflare, that’s not going to matter, as the public is only going to know about the Cloudflare IP address of your proxy server.

#12

The only reason I thought that was because tworiel.cc get’s routed back to NameCheap webpage and it seemed like a local conclusion. I have had a really bad experience with NameCheap, so I think I will go with CloudFlare instead. My apologies for the stupid questions, I have been studying data science at University, yet felt I didn’t understand the system admin side of things, thought learning this would help.

Thanks for your advice and I will see if I can bring my domain name over or purchase a new one and a hosting plan.

#13

If you’re using Cloudflare, that’s not going to matter, as the public is only going to know about the Cloudflare IP address of your proxy server.

Therefore I do not need a reverse proxy?

#14

The “A” record you have for your domain probably points to NameCheap.

Earlier in the thread, you said the wget gave you your ISP’s address. That’s going to be the IP address of your home, where your Linux box is. If your ISP even lets you host Port 80/443, you’re going to need to configure your home router to Port Forward 80 and 443 to the LAN IP address of your Linux box.

Cloudflare is a reverse proxy. Maybe you’re expecting Cloudflare to bridge your internal LAN to the outside world. For that, you’d need something like Argo Tunnel:

For now, you really need to get your Linux box up and running hosting your website before you try to layer Cloudflare on top of it. So set your DNS entries here to :grey: as you work through your DNS and ISP configuration.

#15

OpenCart can already be accessed through local host. Thanks for your time. I will check out argo tunnel and just to confirm, I use the ISP address and prt 80/443. It will probably have to be the latter port as my routers uses 80. Cheers for your help.

1 Like
#16

Out of curiosity, if I was to host it on cloud, I’d be allowed to ask more stupid questions cause there seems like there is so much to learn?

#17

You can certainly ask. :wink:

Cloudflare layers over existing websites quite well in its default configuration. If you can get your site up and running for regular visitors, putting Cloudflare in front of it rarely causes a problem that can’t be fixed.

1 Like
closed #18

This topic was automatically closed after 31 days. New replies are no longer allowed.