Server Integration Notes
Server Integration Notes
Server Integration Notes
Forwarder is a pointer for anything that is not resolved of where to looks for and
query
– ISP DNS server
○ The next chain of the command is then the Root Hint Servers (mainly
13 of these)
○ Root-servers.org
○ Start at the .coms .edu .net and go all the way back down through the
list
– Berkley internet name domain
– Named named daemon (for linux)
BIND
– named.conf
– .zone files are your zones that you have created (example.com.zone file)
– need a forward and a reverse zone setup
– /var/named/chroot/etc
– local time file needs protected as well as the key file
○ reverse would be good to have in case of log files and you can see
names
○ main config file that is to be used
○ need to have a forward lookup zone
this zone queries and resolves ip to name server
reverse lookup is name to ip
– dig
○ shows zone transfer
forward lookup zone and transfers it to another machine (the
secondary)
the dig command can give you servers, machines, (all records
including (a-record == is a host record))
ns shows you the name server /is
cname = alias
people use cnames instead of using a new host a record just for
ease of access
mx record is for the mail exchange servers
PTR records are for pointer record to the cname (reverse lookup
function)
http://en.wikipedia.org/wiki/List_of_DNS_record_types
SRV records (Microsoft creates these for you automatically for
active directory)
○ lookup host records
– updating the DNS records dynamically
○ windows default to this being on
dhcp clients will update the dns records
○ linux has more steps
Need to edit DNS config file
ddns
– named.conf file starting point to help edi t this file
○ listen-on port can be different (ex 53
○ allow-update (who you want to allow updates form )…this could be the
whole subnets (or just a server can be listed)
○ need to setup our zone (very end of config file)
○ zone “group3.com” (
Type master:
file “/var/named/db.instructor.com”; ----this is a flat text file, you
want this to be set to named
• look at named.conf for file location
• file needs filled out specifically
);
○ zone “254.10.10.in-addr.arpa” (
type master:
file “var/named/db.10.10.254.rev”;
----this is your reverse lookup zone
• this is also a flat text file that needs to be edited and
created
– just type hostname on your box and you will get your DNS name record
More DNS
insert an ip address
ifconfig eth0 10.10.10.10 netmask 255.255.255.0
ifconfig to verify
need to edit the
/etc/named.conf (main config file that needs to be configured)
/var/named/<forward zone>
/var/named/<reverse lookup zone>
..more on paper
cd /var/named
nano 10.10.10.0.forward.zone
– first line must contain the start of authority
○ cpt224.com. IN SOA ns1. webmaster.cpt224.com. (
200901881:
10800:
650:
3800: )
cpt224.com. IN NS ns1.
<host records> ns1.cpt224.com IN A 10.10.10.10
<name server is web server> www IN CNAME ns1.cpt224.com
<could insert more host records>
/etc/resolve.conf
put in your name servers here
nameserver <ip>
2 zones are now created
cd /etc/
nano named.conf
has config information needed to togle for the zones to work right
on
listen on port 53 enter the ip address of the DNS server
listen on port 53 ( 10.10.10.10: );
allow –query (10.10.10.0/24; };
every single zone need put in this file (may need a slave)
/etc/init.d/named status
service named start
<errors>
###after the zones are setup you need to setup the zone transfer list and
allow specific server to transfer zone lists. right click on the DNS and
allow a transferrable master server
Jailing
– confine people to a certain area
– creates a false root (can be used with ftp(changing directories wouldn’t work
that way)
– want a jail in a certain directory
○ mkdir myjail (recommend chroot/named/)
○ cd myjail
○ need to trick the user by creating the file system
○ sudo mkdir var, etc, lib, usr, bin, sbin……
○ can also use the command “which”
tells you where that command is located at also to copy
○ now that you have dependencies you need to create files
○ when copying the file you should do the –p to preserve the permissions
of the files
○ sudo cp /bin/bash bin/
this is the executable only
○ sudo ldd /bin/bash
now need to put these files in your jail
○ sudo cp /lib/libtinfo.so.5
now do this for the other ones
○ ldd /bin/pwd
some libraries may be shared between the commands
○ sudo chroot myjail/
now have a command prompt of your jailed folder
○ sudo cp /etc/passwd myjail/etc (would nwant to make this up and
delete the accounts you don’t need in there
○ should do this for every service that you are running
○ need to have root priv to get out of the jail but
run in the jail as a none root user – if you run as root and have
root privs you can get out
restrict
make sure that root owns all the files as possible
○ can all be scripted by jailkit (ccdc)
–
DHCP
ssh
ls /etc/ssh
– ssh config files
○ settings for the host
– sshd_config file is for the server
○ can change the port to help secure ssh
○ listenaddress = is where it will listen to connect (default to listen to
every single port)
○ can also specify what keys to use
○ login grace time (how long to login before getting kicked out)
○ permit root login (not a great idea for security)
○ max number of authorization time (max till kicked)
○ x11 tunelling (some graphical applications through ssh )
○ there is a banner field you can enter it here
○ can login as a specific user with ssh <users@ip>
– ssh config file is on the client side confiduration
– not a bad idea to jail ssh (ssh also supports secure ftp, so this could be a risk
in it’s self)
– both keys are stored into the host
○ /etc/ssh/ssh_host_rsa_key.pub
– besides freesshd for windows you can use openssh with cygwin.com to
emulate linux environment and get ssh to work right with it
nano /etc/ssh/sshd_config
now on the windows machine you need to copy down the private key
(that’s what is used to identify ) to the window’s box
NTP client
under the IIS control panel (has it’s own control panel)
XAMPP and
wordpress
phpnuke
junebug/joomblah
noodle
--all similar to drupal
now can start apache just by clicking start === /etc/init.d/httpd start in linux or
service httpd start
-if any changes are made you need to restart the service to apply the changes
– don’t need apache to get mysql to work but it needs a package that is
included
– start mysql
– now in cmd prompt
– go here C:\MY_cm_website\xampp\mysql\bin
○ now type
mysqladmin -u root create drupaldb
xammpp – does not have root password
not same root user as the linux system
• root user for mysql database
this creates the database
○ give permission from a database to a user
give some users permission to that database
• mysql –u root
• now type mysql> GRANT SELECT, INSERT, UPDATE,
DELETE, CREATE, DROP, INDEX, ALTER ON drupaldb.* TO
'cisco'@'localhost' IDENTIFIED BY 'cisco2009';
• Query OK, 0 rows affected (0.03 sec)
○ GRANT TELLS what to do
○ type quite
now need to edit the httpd.conf fiel
– DocumentRoot "C:/MY_cm_website/xampp/htdocs/drupal"
–
• restart apacheand now you have drupal running
now need to go
C:\MY_cm_website\xampp\htdocs\drupal\sites\default
make two copies of
• this file default.settings.php
• change the copy file
○ rename to settings.php
○ now click try again on the webpage
•
---mysql-client-5.0
---mysql-server-5.0
installed
---server root password is group3pwnsu
apache IN CNAME <dns host record for the fedora server FQDN)
-
Certificates
stuff to do
----
ubuntu
---install apache
-----new labs are on webct
------each need to install a 2k3 server – rich needs to do a enterprise root CA, others
are subordinate (lab 7 setup) also install IIS on the subordinates (name them
win2k3-X)
------------have main DC with secure web server running
------service locator records are created on the server by default when you promote
the machine (If it is a secondary zone then it is a read-only without the SRV records
– can’t join a PC to the domain)
---------so need to do this for the fedora box
$ttl 38400
group3.com. IN SOA group3-Fedora10. fake.fake.com. (
1232999249
10800
3600
604800
38400 )
group3.com. IN NS group3-Fedora10.
Win2k3.group3.com. IN A 10.10.3.150
Win2k3-2.group3.com. IN A 10.10.3.152
Win2k3-3.group3.com. IN A 10.10.3.153
Win2k3-4.group3.com. IN A 10.10.3.154
Win2k3-5.group3.com. IN A 10.10.3.155
Ubuntu.group3.com. IN A 10.10.3.200
WinXP.group3.com. IN A 10.10.3.10
Kubuntu.group3.com. IN A 10.10.3.11
Fedora10.group3.com. IN A 10.10.3.100
www.group3.com. IN A 10.10.3.200
mail.group3.com. IN MX 1 10.10.3.100