LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-29-2014, 05:52 AM   #1
Tapash
LQ Newbie
 
Registered: Aug 2013
Posts: 14

Rep: Reputation: Disabled
Newbie: DNS, Port Forward, web and email hosting


Hi All
I am having hard time figuring this out. Sorry if its vary basic question for some of you, but i am just learning all these stuff now..
First thing first, i bought a domain name example.com from godaddy.
I have centos 6 server setup at home, IP 192.168.1.45
External IP for the router 66.77.88.99
Now i want to setup Bind Dns server on my Centos to resolve the name example.com
  • if I setup bind on my centos server do i need to do a port forwarding on my router to redirect the incoming traffic on the example.com?
  • when i setup dns do i need to use the name server that was provided by godaddy?

At this point i am using DNS A record on godaddy to redirect the traffic to my external Ip, and portforwarded to my centos server.
 
Old 03-29-2014, 11:45 AM   #2
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by Tapash View Post
Hi All
I am having hard time figuring this out. Sorry if its vary basic question for some of you, but i am just learning all these stuff now..
First thing first, i bought a domain name example.com from godaddy.
I have centos 6 server setup at home, IP 192.168.1.45
External IP for the router 66.77.88.99
Now i want to setup Bind Dns server on my Centos to resolve the name example.com
  • if I setup bind on my centos server do i need to do a port forwarding on my router to redirect the incoming traffic on the example.com?
  • when i setup dns do i need to use the name server that was provided by godaddy?

At this point i am using DNS A record on godaddy to redirect the traffic to my external Ip, and portforwarded to my centos server.

You need to make sure that traffic coming to your router is being forwarded to your Cent OS machine. That means , you need to forward port 80 (and 443 if you intend to use https) to IP 192.168.1.45. (Make sure that internal IP is static!)
Next, you need to make sure example.com is being resolved to your public ip. If you have a static external ip (which you probably don't), GoDaddy can do that for you. If you have a dynamic ip, you need to use a dynamic dns service. If your package at godaddy supports dynamic dns, you could use e.g. ddclient to take care of the update...

Bind is quite complicated to set up, and probably way more than you need.

Some routers will also support dynamic dns. If yours does, you don't even have to deal with that on the cent os machine.
 
Old 03-29-2014, 12:05 PM   #3
Tapash
LQ Newbie
 
Registered: Aug 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by joe_2000 View Post
You need to make sure that traffic coming to your router is being forwarded to your Cent OS machine. That means , you need to forward port 80 (and 443 if you intend to use https) to IP 192.168.1.45. (Make sure that internal IP is static!)
Next, you need to make sure example.com is being resolved to your public ip. If you have a static external ip (which you probably don't), GoDaddy can do that for you. If you have a dynamic ip, you need to use a dynamic dns service. If your package at godaddy supports dynamic dns, you could use e.g. ddclient to take care of the update...

Bind is quite complicated to set up, and probably way more than you need.

Some routers will also support dynamic dns. If yours does, you don't even have to deal with that on the cent os machine.
Many Thanks for reply I have set it up exactly the way you have explained.

Also Yes, I have Static external IP. At this moment I am using godaddy DNS A record to redirect the traffic to my external IP.

But the problem I am having when I try to setup A mail server. I am using iRedmail. I can send email. but I do not receive any email if thet email is replied.

I have MX Record setup (mail.example.com) on godaddy DNS. I looked on the internet where experts are saying proper DNS server needs to setup to make a proper mailserver.... Thats why I was thinking to setup BIND....

If you have any suggestion would be much appreciated...
 
Old 03-29-2014, 05:31 PM   #4
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello Tapash,

I run 2 Centos 6.5 Servers from home - 1. FTP Server, 2. Mail & Web Server with port forwarding setup for ports 20-21 for the FTP server, and ports 110 (POP) and 25 (SMTP). In this type of setup a BIND server is not required and you'll simply end up complicating things for the sake of it.

Not knowing anything about iRedmail i'm not aware of whether it's a combined SMTP / POP agent or simply used as an SMTP MTA (Mail Transfer Agent). Personally I use Sendmail for SMTP and Dovecot for POP.

You mentioned that if someone replies to an email you have sent you do not receive it, so what happens if a user attempts to send you a brand new email rather than replying to an existing email they have received - I am assuming that you do not receive that either...?

Regarding you not receiving incoming emails:

1. Have you correctly set up port forwarding via your router for both SMTP and POP ports?
2. Ask someone to send you an email, and check your log files for error messages occurring around that time - Sendmail / Dovecot typically use /var/log/maillog - not sure about iRedmail
3. Is it possible your Centos firewall is blocking incoming mail (POP) on port 110..?

Regards,

Rawcous!
 
Old 03-29-2014, 05:39 PM   #5
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by Tapash View Post
I have MX Record setup (mail.example.com) on godaddy DNS.
You also need an A record for mail.example.com.

Forget setting up BIND - just use Godaddy's DNS server.
 
Old 03-31-2014, 01:31 PM   #6
Tapash
LQ Newbie
 
Registered: Aug 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rawcous View Post
Hello Tapash,

I run 2 Centos 6.5 Servers from home - 1. FTP Server, 2. Mail & Web Server with port forwarding setup for ports 20-21 for the FTP server, and ports 110 (POP) and 25 (SMTP). In this type of setup a BIND server is not required and you'll simply end up complicating things for the sake of it.

Not knowing anything about iRedmail i'm not aware of whether it's a combined SMTP / POP agent or simply used as an SMTP MTA (Mail Transfer Agent). Personally I use Sendmail for SMTP and Dovecot for POP.

You mentioned that if someone replies to an email you have sent you do not receive it, so what happens if a user attempts to send you a brand new email rather than replying to an existing email they have received - I am assuming that you do not receive that either...?

Regarding you not receiving incoming emails:

1. Have you correctly set up port forwarding via your router for both SMTP and POP ports?
2. Ask someone to send you an email, and check your log files for error messages occurring around that time - Sendmail / Dovecot typically use /var/log/maillog - not sure about iRedmail
3. Is it possible your Centos firewall is blocking incoming mail (POP) on port 110..?

Regards,

Rawcous!
Thank you very much for your input. Do you mind sharing your configuration files please?
 
Old 03-31-2014, 03:10 PM   #7
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Quote:
Thank you very much for your input. Do you mind sharing your configuration files please?
Hello,

I don't mind assisting but I am not going to to simply hand over my config files without seeing some input from you, i.e:

1. The steps you have taken yourself.
2. What research have you done.
3. Errors received.

Also, I previously indicated that you should check your log files for any possible errors that you may be receiving when someone replies / sends you an email. Have you done this? Have you checked for the existence of the log file /var/log/maillog? If this does not exist then maybe the contents of /var/log/messages or an alternative iRedmail log file. As mentioned I use sendmail / dovecot for handling smtp / pop traffic - thus the config files as they stand cannot be imported into iRedmail.

Also as indicated a couple of times on here the use of BIND for your needs is overkill - As I have mentioned I run 2 personal servers without the use of bind simply by correctly setting up port forwarding via my router.

Regards,

Rawcous!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please recommend a cheap email hosting with a good web interface jimdaworm General 12 12-30-2008 10:21 AM
how to Port forward web server using iptables wilper Linux - Networking 1 04-15-2007 12:39 PM
web hosting newbie questions jrfly Linux - Newbie 3 11-01-2004 05:38 PM
Forward port port 80 to lan web server dulaus Linux - Networking 9 10-04-2002 03:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration