and then Do ===>
Configure DNS server ?
1. we must disable the firewall in the machine
# iptables -F // flush (delete all rules)
# /etc/rc.d/init.d/iptables stop // stop the service
# chkconfig --level 3 iptables off // stop this service when run level 3 starts
2a. in the master: pico the file /etc/named.conf
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want to talk to, you
* might need to uncomment the query-source directive below. Previous versions
* of BIND always asked questions using port 53, but BIND 8.1 uses an
* unprivileged port by default.
*/
// query-source address * port 53;
};
// a caching only nameserver config
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca"; //var/named/named.ca
};
zone "localhost" IN { //default
type master;
file "localhost.zone";
allow-update { none; };
};
zone "paltel.com" IN { //our zone
type master;
file "paltel.com.zone"; //we must create this file in /var/named
allow-update { 192.168.0.2; };
};
zone "0.168.192.in-addr.arpa" IN { //reverse Zone (note that netId reversed ) type master;
file "paltel.com.rev";
allow-update { 192.168.0.2; };
};
include "/etc/rndc.key";
3a. in the file /etc/resolv.conf
nameserver 192.168.0.1
4a. touch the file /var/named/paltel.com.zone and pico it
$TTL 86400
@ IN SOA paltel.com root.paltel.com ( //serverName, mailTo
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS paltel.com.
IN NS mail.paltel.com.
@ IN A 192.168.0.1 // @=paltel.com(zone name)
mail IN A 192.168.0.2
www IN CNAME paltel.com.
//if the statment does not ende with "." mean that zoneName will appended
// => mail = mail.paltel.com.
5. touch the file /var/named/paltel.com.rev and pico it
$TTL 86400
@ IN SOA paltel.com. root.paltel.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS paltel.com.
IN NS mail.paltel.com.
1 IN PTR paltel.com.
2 IN PTR mail.paltel.com.
2b. in the slave: pico the file /etc/named.conf
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want to talk to, you
* might need to uncomment the query-source directive below. Previous versions
* of BIND always asked questions using port 53, but BIND 8.1 uses an
* unprivileged port by default.
*/
// query-source address * port 53;
};
// a caching only nameserver config
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca"; //var/named/named.ca
};
zone "localhost" IN { //default
type master;
file "localhost.zone";
allow-update { none; };
};
zone "paltel.com" IN {
type slave;
file "paltel.com.zone";
masters { 192.168.0.1; }; //it get the zone file from the server
};
zone "0.168.192.in-addr.arpa" IN { //reverse Zone (note that netId reversed )
type slave;
file "paltel.com.rev";
masters { 192.168.0.1; };
};
include "/etc/rndc.key";
3b. in the file /etc/resolv.conf
nameserver 192.168.0.1
6. to apply changes you must type :
# service named restart
or # /etc/rc.d/init.d/named restart
7. test your configuration by typing :
[root@SAD /var/named]# host paltel.com
paltel.com has address 192.168.0.1
[root@SAD /var/named]# host
www.paltel.com
www.paltel.com is an alias for paltel.com.
paltel.com has address 192.168.0.1
[root@SAD /var/named]# host mail.paltel.com
mail.paltel.com has address 192.168.0.2
[root@SAD /var/named]# host 192.168.0.1
1.0.168.192.in-addr.arpa domain name pointer paltel.com.
[root@SAD /var/named]# host 192.168.0.2
2.0.168.192.in-addr.arpa domain name pointer mail.paltel.com.
- Configure SendMail ?
1. after installation pico /etc/mail/local-host-names which will contains the domains that sendmail will treat as local and process for delivery
# local-host-names - include all aliases for your machine here.
paltel.com
localhost
2. /var/named/paltel.com.zone must contains lines like
IN NS paltel.com.
IN NS mail.paltel.com.
@ IN A 192.168.0.1
@ IN MX 10 @
mail IN CNAME @
3. pico the file /etc/aliases which contains the mail aliasses for forwarding mails and append these lines then run the command "newaliases" to apply changes
info : root
admin : root
support : root,sad //if mail come to support@mydomain then it will redirected to
//root & sad mail boxes
4. pico the file /etc/mail/access which contains the computers or subnets which can use our mail deamon
[root@SAD /etc/mail]# cat access
# by default we allow relaying from localhost...
localhost RELAY
127.0.0.1 RELAY
paltel.com RELAY
192.168.0 RELAY
5. pico the file /etc/mail/sendmail.mc and add these lines
MASQUERADE_AS(`paltel.com')dnl
MASQUERADE_DOMAIN(`paltel.com')dnl
FEATURE(`masquerade_entire_domain')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
MAILER(local)dnl
#Cwpaltel.com
6. convert mc file to cf file using m4 tool
# m4 sendmail.mc >sendmail.cf
7. on the mail server we must enable imap and pop3 protocols (change the line disable = no in the files /etc/xinetd.d/imap and /etc/xinetd.d/ipop3 ) the restart xinetd super service
# service xinetd restart
8. start sendmail
# /usr/sbin/sendmail -bd //bd: bg deamon
or
# service sendmail start
but I cant find imap and pop3 services
Recent comments
1 day 16 hours ago
1 day 18 hours ago
2 days 6 hours ago
2 days 9 hours ago
2 days 13 hours ago
2 days 19 hours ago
3 days 5 hours ago
3 days 7 hours ago
3 days 15 hours ago
3 days 16 hours ago