====== LDAP on Debian setup notes ====== LDAP server package is slapd. LDAP command-line stuff gets installed along with it. First database is set up automatically - only requirement is admin password. Root DN is taken from host IP domain name - so get dc=physics,dc=gla,dc=ac,dc=uk if not careful. And with OpenLDAP there's no easy way to delete databases. ===== Browsers ===== ==== Web-based ==== [[http://phpldapadmin.sourceforge.net/|phpLDAPadmin]] works reasonably well as a server-based browser. Needs Apache. This template gives you users with the RDN set to uid rather than cn, and email entry. Note that for this to work you need an existing group and user with numbers set, otherwise the autonumber logic doesn't work. Or the template could be modified to let you enter them directly. ==== Windows ==== There are a few browsers that work with Windows. [[http://jxplorer.org/|JXplorer]] is cross platform - couldn't get it to work on Win7 x64 with Java 7. Trying out [[http://www.ldapadmin.org/|LDAP Admin]] which looks quite nice. ===== Firewall setup ===== Using usual setup - following the guide at [[http://www.medorion.net/p/19.xhtml]] edit the ''/etc/network/interfaces'' file to include the command ''pre-up iptables-restore < /etc/iptables.conf'' just after the loopback stuff (why? dunno) so the file looks something like # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback pre-up iptables-restore < /etc/iptables.conf # The primary network interface allow-hotplug eth0 iface eth0 inet static ... *filter # Create filter chain for Physics subnets only -N PHYSICSONLY -A PHYSICSONLY -s 130.209.45.0/24 -j ACCEPT -A PHYSICSONLY -s 130.209.202.0/24 -j ACCEPT -A PHYSICSONLY -s 130.209.204.0/24 -j ACCEPT -A PHYSICSONLY -s 172.20.45.0/24 -j ACCEPT -A PHYSICSONLY -s 172.20.202.0/24 -j ACCEPT -A PHYSICSONLY -s 172.20.204.0/24 -j ACCEPT # This will allow all loopback (lo0) traffic and drop all traffic to 127/8 # that does not use lo0 -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT # This accepts all already established connections -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # This allows all outbound traffic -A OUTPUT -j ACCEPT # Allow SSH and pings from Physics subnets only -A INPUT -p tcp -m state --state NEW --dport 22 -j PHYSICSONLY -A INPUT -p icmp -m icmp --icmp-type echo-request -j PHYSICSONLY -A INPUT -p tcp -m state --state NEW --dport 443 -j PHYSICSONLY # Allow HTTP(S) from anywhere #-A INPUT -p tcp -m state --state NEW --dport 443 -j ACCEPT #-A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT # Allow LDAP(S) queries from Physics only -A INPUT -p tcp -m state --state NEW --dport 389 -j PHYSICSONLY -A INPUT -p tcp -m state --state NEW --dport 636 -j PHYSICSONLY # Reject all other inbound traffic -A INPUT -j REJECT -A FORWARD -j REJECT COMMIT