############################################################### # setup anonymous ftp (see man in.tftpd for the startup script # setup tcp_wrappers # create a telnet service on port 777 # setup Basic Apache server ############################################################### ################################## # paper due April 27th. ################################## #man inftpd Contains the scritp to setup the server. #create the group groupadd -g 30000 ftp # create the user ftp usruseradd -u 30000 -g 30000 -d /home/ftp -c "Anonymous FTP" -s /nosuchshell -m ftp ################################# # stide note: ## Removing ^H, ^M, vi :g/vH #setting a top marker #scroll curser there t t #setting a bottom marker #move to end of file t b Now you can copy the contents elsewere. :'t,'b w! dog #write from top to bottom, creating ./aftp.sh grep ftp /etc/serverices vi /etc/inetd.conf ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd chmod 777 /home/ftp/pub #### # test #### ftp localhost login: anonymous passwd: email@address.com cd pub put ####################################################################### # tcp wrapers restrict access by soucre address and protocol ####################################################################### # # Tcp_wrappers handle telne, finger, ftp, exec, rsh, rlogin, tftp, talk, comsat, # and stuff listed in /etc/inetd.conf # this is an IPv4 service. it is not compatable with IPv6 # # hosts.allow, hosts.deny, and hosts.equiv # tcpdchk - checks services # tcpdmatch - check a host # # #for open systems, # hosts.allow has "ALL:ALL" # hosts.deny has the ones you don't allow. # # for closed system # hosts.allow has # ALL:127.0.0.1 # in.finger:gulden.net # hosts.deny has "ALL:ALL" ftp 10.4.1.230 login: ftp passwd: bla@bla.com >lcd /usr/local/src/ >promt off >cd pub >mget tcp_wrappers_7.6.1.tar.gz >quit /usr/local/bin/gzip -d tcp_wrappers_7.6.1.tar.gz tar -xvpf tcp_wrappers_7.6.1.tar cd tcp_wrappers_7.6.1 vi Makefile # uncomment REAL_DAEMON_DIR=/usr/sbin PATH=$PATH:/usr/css/bin:/usr/local/bin make sunos5 CC=/usr/local/bin/gcc cp tcpd /ysr/sbin vi inetd.conf # find: telnet stream tcp wait nobody /usr/sbin/in.telnetd in.telnetd # change: telnet stream tcp wait nobody /usr/sbin/tcpd in.telnetd ps -ef |grep inet kill -HUP 161 vi /etc/hosts.deny # ALL:ALL ## Test: try to telnet to the local host. ### We are denied vi /etc/hosts.allow # ALL:127.0.0.1 ## Test: try to telnet to the local host. ### We are allowed ################################## # Add a new service called telnet ################################## vi /etc/services # make a telnet on port 777 vi /etc/inetd.conf # make a telnet on port 777 ####################################### ### log connections in /var/log/authlog ####################################### ########################################################################## # Apache install ########################################################################## # we will use 1.3.19. # it was a patch to NCSA (national center for supper computers # ftp 10.4.1.230 login: ftp passwd: bla@bla.com >lcd /usr/local/src/ >promt off >cd pub >mget apache_1.3.13.tar.gz gzipo -d apache_1.3.13.tar.gz tar -xvpf apache_1.3.13.tar cd apache_1.3.19 vi Makefile # look for ./configure make make install # should go in /usr/local/apache # play with the perl scripts vi httpd.conf # chagne ServerName to ip of machine. # apachectl start/stop/checkconfig/... #create soft link /etc/rc3.d/S50httpd ln -s /usr/local/apache/bin/apachectl /etc/rc3.d/S50httpd tail -f /usr/local/apache/log/access_log