Skip to content

Instantly share code, notes, and snippets.

@nickedes
Last active August 29, 2015 14:21
Show Gist options
  • Save nickedes/620e5ed8f6136ef54d19 to your computer and use it in GitHub Desktop.
Save nickedes/620e5ed8f6136ef54d19 to your computer and use it in GitHub Desktop.
ftp,dhcp
#FTP
sudo apt-get install vsftpd
sudo service vsftpd start
ftp localhost
#Den receive data by get -> get filename
#and send by put -> put filename
=======================================================================================================
#DHCP
sudo apt-get install isc-dhcp-server
#open the isc-dhcp-server file which is located in /etc/default/isc-dhcp-server
sudo gedit /etc/default/isc-dhcp-server
#changes interfaces in the last line to
#interfaces = "eth0"
#open the dhcpd.conf which is located in /etc/dhcp/dhcpd.conf
sudo gedit /etc/dhcp/dhcpd.conf
#now define lease time ( default and max lease time ) optional domain name and domain name servers , the range of IP addresses #that you want DHCP server to assign to hosts , the network address , the subnet mask
#use this configuration.
# subnet 192.168.1.0 netmask 255.255.255.0 {
# range 192.168.1.80 192.168.1.90;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 192.168.1.1;
# option broadcast-address 192.168.1.255;
# default-lease-time 60;
# max-lease-time 60;
# }
#After making changes to the configuration files , save them and start the DHCP server by typing the command-
sudo service isc-dhcp-server start.
# After this connect to the client via ethernet cable.
# Make sure that the network settings are selected to DHCP at the client's site.
# Now type the command ifconfig at terminal at client's site.
# You will notice that the ip assigned to client is in between the range we defined for the DHCP server.
# You can check for the exact process running at the background by checking system log file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment