?
Solved

How to configure static ip in DNS

Posted on 2010-01-10
19
Medium Priority
?
1,752 Views
Last Modified: 2013-11-15
hi i have to configure zimbra below are the ip

Zimbra Machine ip - 192.168.15.2
static ip - 122.162.80.50

i had configured local dns and its working proerly, where should i make the changes so that i bind my domain with the 122.162.80.50

###############################################################################
1  vi /etc/hosts

127.0.0.1       localhost.localdomain  localhost
192.168.15.2   server1.tm.local  server1

################################################################################

vi /etc/resolv.conf
 
  search tm.local
  nameserver 192.168.15.2 (ip of zimbra machine)

################################################################################

vi /etc/bind/named.conf.local

   zone "tm.local" {
        type master;
        file "/etc/bind/zones/tm.local.db";
        };


zone "15.168.192.in-addr.arpa" {
     type master;
     file "/etc/bind/zones/rev.15.168.192.in-addr.arpa";
};

###############################################################################

vi /etc/bind/zones/tm.local.db


$TTL 1500
@  IN SOA server1.tm.local. root.tm.local. (
                             2007062703        ;serial
                             28800             ;refresh
                             3600              ;retry
                             604800            ;expire
                             38400 )           ;minimum 25 minutes
@       IN      NS      server1
        IN      MX      10 server1
        IN      A       192.168.15.2
server1 IN      A       192.168.15.2

###############################################################################

vi /etc/bind/zones/rev.15.168.192.in-addr.arpa

$TTL 1500
@  IN SOA server1.tm.local. root (
                             2007062703        ;serial
                             28800             ;refresh
                             3600              ;retry
                             604800            ;expire
                             38400 )           ;minimum 25 minutes

                     IN    NS     server1.tm.local.
2                  IN    PTR    server1.tm.local.

###############################################################################


below is my dig answer for domain ( tm.local)

root@server1:~# dig server1.tm.local

; <<>> DiG 9.4.2-P2.1 <<>> server1.tm.local
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2915
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;server1.tm.local.              IN      A

;; ANSWER SECTION:
server1.tm.local.       1500    IN      A       192.168.15.2

;; AUTHORITY SECTION:
tm.local.               1500    IN      NS      server1.tm.local.

;; Query time: 0 msec
;; SERVER: 192.168.15.2#53(192.168.15.2)
;; WHEN: Fri Jan  8 08:58:02 2010
;; MSG SIZE  rcvd: 64


now as i have taken static  ip ( 122.162.80.50 )  plz guide me in dns so that i can configure DNS with my static ip.
0
Comment
Question by:pawanopensource
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 4
19 Comments
 
LVL 19

Expert Comment

by:bevhost
ID: 26277143
The statis IP is a public IP address and will need to be registered in the public DNS if it is to work from the internet.
Do you have a domain name registered on the internet with name servers visible to the internet?
If so, that is where you should create your A record.
You should ask your ISP to create the reverse PTR record.
0
 
LVL 19

Accepted Solution

by:
bevhost earned 1000 total points
ID: 26277157
The A record name should match the PTR reverse name.
Ideally you should also change the hostname annouced by the HELO / EHLO command in your mail server to match.
Also the name that appears in the SMTP greeting message should also be the same.
You can use the myhostname directive in postfix to do this.
If you do it in main.cf it will change all interfaces
or you can have multiple entries in master.cf like so.

122.162.80.50:smtp      inet  n       -       n       -       -       smtpd
  -o myhostname=server1.tm.com
192.168.15.2:smtp      inet  n       -       n       -       -       smtpd
  -o myhostname=server1.tm.local
127.0.0.1:smtp      inet  n       -       n       -       -       smtpd
  -o myhostname=server1.tm.local

Open in new window

0
 
LVL 19

Expert Comment

by:bevhost
ID: 26277165
If you don't have the public IP address bound directly to the machine, and is passed through NAT, just specify the myhostname directive in main.cf so that it uses the external name when talking to all clients.  Your internal clients shouldn't mind that the name doesn't match.  Anti spam checkers on the internet are much more fussy.
0
PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

 

Author Comment

by:pawanopensource
ID: 26277226
hi bevhost,

thx for the reply. but friend i am not such an expert like u. i just know that i am having public ip

zimbra machine ip - 192.168.15.2
public ip - 122.162.80.50

i had made a local dns(tm.local), which i had given the config files i havent configured public ip with my dns. zimbra is working fine locally i had created domain tm.local i can easily send and receive emails between the users of tm.local (locally) now i want to make my zimbra server live by using public ip 122.162.80.50 plz guide what and from should i start.

0
 

Author Comment

by:pawanopensource
ID: 26277481
hi bevhost,
u r right i am not having any dedicated public ip bound directly to my computer. i check my ip by www.whatismyip.com the. right now my ip is 122.176.15.4 so i want to configure this public ip in my zimbra so that i can access zimbra from outside.
thx
0
 
LVL 26

Assisted Solution

by:jar3817
jar3817 earned 1000 total points
ID: 26277578
You need to forward TCP port 25 on your NAT router to the internal IP address of your zimbra server. The procedure depends on the actual device you have doing the NAT.
0
 

Author Comment

by:pawanopensource
ID: 26277607
first of all thx a lot jar as i am getting very very slow reply on questions regarding zimbra. hope i can get solution from u. ok i have forwarded the TCP port 25 from my router. how do i access zimbra from outside. i am using dyndns.org and my domain is opensourcesolution.in
shall i access zimbra like this

http://opensourcesolution.dyndns.org/zimbra
0
 
LVL 26

Expert Comment

by:jar3817
ID: 26277634
Well two more things...

1. The tcp/25 forward will allow email to reach zimbra. To view the web interface for it, you'll also need to forward tcp/80 to your zimbra server.

2. Right now that hostname "opensourcesolution.dyndns.org" resolves to a different IP address. You need to change that to be your public IP address (122.162.80.50) instead.

# host opensourcesolution.dyndns.org
opensourcesolution.dyndns.org has address 122.176.15.4
0
 

Author Comment

by:pawanopensource
ID: 26277650
1. The tcp/25 forward will allow email to reach zimbra. To view the web interface for it, you'll also need to forward tcp/80 to your zimbra server.


i am running apache on port 3333 so i forwarded port 3333 from my router

Listen 3333

<IfModule mod_ssl.c>
    Listen 443
</IfModule>

2.Right now that hostname "opensourcesolution.dyndns.org" resolves to a different IP address. You need to change that to be your public IP address (122.162.80.50) instead.

i agrree with u can u plz guide me in changing the ip to 122.176.15.4.  above i had given all the config files which i had created for my local dns. i can access zimbra by http://192.168.15.2/zimbra locally.
0
 
LVL 26

Expert Comment

by:jar3817
ID: 26277666
"i am running apache on port 3333 so i forwarded port 3333 from my router
Listen 3333"

The problem is zimbra uses it's own http server (tomcat I think), not apache. So the zimbra webserver is still listening on port 80, not 3333. You can forward some other port externally to 80 internally, but the destination has to be 80 unless you change the port zimbra is listening on.

The DNS change can't be done locally. Since this name is hosted at dyndns.org, you need to login to their website and change it there.

Even if you take the DNS out of the picture, you need to forward the ports so that http://122.162.80.50/zimbra will work (which doesn't right now).
0
 

Author Comment

by:pawanopensource
ID: 26277720
ok look friend i earlier i had configured POSTFIX on ubuntu and i am having domain opensourcesolution.in with some email account in that domain. in postfix i had mentioned all that email ids in vi/etc/fetchmailrc with their POP address and from relay host = opensourcesolution.in i am relaying mails to outside world. and how i access squirrelmail is i had made an account in dyndns.org than i login my dyndns account than i update opensourcesolution.com and it binds ip to my domain and than in my router i do port 80 forwarding for squirrelmail and i access squirrelmail by this path http://opensourcesolution.dyndns.org/squirrelmail.  


same i want to do with zimbra i want to pop mails from opensourcesolution.in  in imbra n than relay to outside world by using dyndns.

n by the way i changed the port to 80 and when i restarted i get this error

root@server1:~# /etc/init.d/apache2 restart
 * Restarting web server apache2                                               httpd (no pid file) not running
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                                        [fail]

i appreciate that u r giving help to a begginer like me



0
 

Author Comment

by:pawanopensource
ID: 26277786
jar now i can access zimbra from outside by dynddns i had done port 80 forwarding n than i am accessing by http://opensourcesolution.dyndns.org/zimbra
0
 
LVL 26

Expert Comment

by:jar3817
ID: 26278482
Nice job! So it's all working now?
0
 

Author Comment

by:pawanopensource
ID: 26278581
small thing is left.look now i can access zimbra from outside but i cant send mails outside or can receive emails from outside, do i have to mention in

/opt/zimbra/main.cf

relayhost = server1.tm.local

0
 
LVL 26

Expert Comment

by:jar3817
ID: 26278727
You could do that or even relay to your ISP and have them deliver for you. I just did a PTR lookup on your IP and it looks like a residential dynamic one:

$ host 122.162.80.50
50.80.162.122.in-addr.arpa domain name pointer ABTS-North-Dynamic-050.80.162.122.airtelbroadband.in.

It might be static, but you're going to have a lot of trouble sending mail with reverse DNS looking like that. You should call up your ISP and see if they'll change that to something more legit looking.

You should be able to receive mail though. You forwarded port tcp/25 to the zimbra server right? Is the MX record for the domain pointing to that server too?
0
 

Author Comment

by:pawanopensource
ID: 26278838
friend,
i really appreciate ur efforts which u r doing for me. as i am a beginner in zimbra, so not so much sound. just bcos of me i am taking u 2 wrong direction.may be this time i can make explain more clearly to u.


i had configured zimbra with creating local dns or split-dns. zimbra is working fine i can send and receive emails locally. below are the details

Split-dns - server1.tm.local

my split-dns cofig files and dig server1.tm.local reply


###############################################################################
1  vi /etc/hosts

127.0.0.1       localhost.localdomain  localhost
192.168.15.2   server1.tm.local  server1

################################################################################

vi /etc/resolv.conf
 
  search tm.local
  nameserver 192.168.15.2 (ip of zimbra machine)

################################################################################

vi /etc/bind/named.conf.local

   zone "tm.local" {
        type master;
        file "/etc/bind/zones/tm.local.db";
        };


zone "15.168.192.in-addr.arpa" {
     type master;
     file "/etc/bind/zones/rev.15.168.192.in-addr.arpa";
};

###############################################################################

vi /etc/bind/zones/tm.local.db


$TTL 1500
@  IN SOA server1.tm.local. root.tm.local. (
                             2007062703        ;serial
                             28800             ;refresh
                             3600              ;retry
                             604800            ;expire
                             38400 )           ;minimum 25 minutes
@       IN      NS      server1
        IN      MX      10 server1
        IN      A       192.168.15.2
server1 IN      A       192.168.15.2

###############################################################################

vi /etc/bind/zones/rev.15.168.192.in-addr.arpa

$TTL 1500
@  IN SOA server1.tm.local. root (
                             2007062703        ;serial
                             28800             ;refresh
                             3600              ;retry
                             604800            ;expire
                             38400 )           ;minimum 25 minutes

                     IN    NS     server1.tm.local.
2                  IN    PTR    server1.tm.local.

###############################################################################


below is my dig answer for domain ( tm.local)

root@server1:~# dig server1.tm.local

; <<>> DiG 9.4.2-P2.1 <<>> server1.tm.local
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2915
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;server1.tm.local.              IN      A

;; ANSWER SECTION:
server1.tm.local.       1500    IN      A       192.168.15.2

;; AUTHORITY SECTION:
tm.local.               1500    IN      NS      server1.tm.local.

;; Query time: 0 msec
;; SERVER: 192.168.15.2#53(192.168.15.2)
;; WHEN: Fri Jan  8 08:58:02 2010
;; MSG SIZE  rcvd: 64
############################################################################

i have two domains on a shared hosted server those two domains details are

1-  opensourcesolution.com
and created three email accouts in opensourcesolution.com

pawan@opensourcesolution.com,info@opensourcesolution.com,sales@opensourcesolution.com


Email Client setup information:
-------------------------------
IMAP server: imap7.mail.pw
POP server: pop7.mail.pw
SMTP server: smtp7.mail.pw



2 - astitva.com
 here also created three email accounts.

pawan@astitva.com, info@astitva.com, sales@astitva.com

Email Client setup information:
-------------------------------
IMAP server: imap5.mail.pw
POP server: pop5.mail.pw
SMTP server: smtp5.mail.pw

now i want that zimbra should fetch these two domains mails from shared hosted server i.e (mail.pw) and from zimbra, users should get the emails of these two domains.

any help and support will be highly appreciated

Regards
0
 
LVL 19

Expert Comment

by:bevhost
ID: 26311806
So where is the static IP address bound to?
Is it on your router?
Did you port forward it through?
When I try to connect on Port 25 or Port 80 I get the results below.
dave@hs ~ $ telnet 122.162.80.50 25
Trying 122.162.80.50...
telnet: connect to address 122.162.80.50: Connection refused
telnet: Unable to connect to remote host: Connection refused
dave@hs ~ $ telnet 122.162.80.50 80
Trying 122.162.80.50...
Connected to ABTS-North-Dynamic-050.80.162.122.airtelbroadband.in (122.162.80.50).
Escape character is '^]'.
Connection closed by foreign host.

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Easy CSR creation in Exchange 2007,2010 and 2013
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
Suggested Courses
Course of the Month8 days, 13 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question