Home
Calendar
Certifications
Columns
Features
Forum
Resources
Vitals
Latest Additions
April 2013 Free Giveaway Sponsor - eLearnSecurity
Human Intelligence to Navigate the Security Data Deluge
February 2013 Free Giveaway Winner of SANS CyberCon Training
Interview: Bugcrowd Founders on Herding Ninjas for Crowdsourced Bug Bounties
Network Forensics: The Tree in the Forest
March 2013 Free Giveaway Sponsor - Mile2
Book Review: Violent Python
February 2013 Free Giveaway Sponsor - SANS
Holiday 2012 Free Giveaway Winner of Metasploit Pro by Rapid7
Course Review: SANS FOR408 Computer Forensic Investigations – Windows In-Depth
The Security Consulting Sugar High
Tutorial: Fun with SMB on the Command Line
Interview: Ilia Kolochenko, CEO of High-Tech Bridge
October 2012 Free Giveaway Winner of LearningGate Training
The Broken: Assessing Corporate Security in 2012 to Make a Better 2013
EH-Net Login
Welcome Guest.
Username:
Password:
Remember me
Lost Password?
No account yet?
Register
Who's Online
We have 45 guests and 1 member online
Free Business and Tech Magazines and eBooks
You are here:
Home
Ethical Hacking Discussions and Related Certifications
General Certification
OS
DHCP Lease time
EH-Net
May 24, 2013, 12:35:41 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Go back to The Ethical Hacker Network Online Magazine
Home Page
Home
Help
Calendar
Login
Register
EH-Net
>
Ethical Hacking Discussions and Related Certifications
>
General Certification
>
OS
>
DHCP Lease time
Pages: [
1
]
2
Go Down
« previous
next »
Print
Author
Topic: DHCP Lease time (Read 11478 times)
0 Members and 1 Guest are viewing this topic.
vp75
Jr. Member
Offline
Posts: 78
DHCP Lease time
«
on:
December 30, 2011, 08:24:16 PM »
Hi guys,
Could some one help me on DHCP lease time...please...
My query: Where is default dhcp lease time provided in linux flavours like ubuntu?
Thru google I came to conclusion it is in /etc/dhcp3/dhcp-client.conf file, where it has settings for eth0 with ipaddress, gateway, subnet, lease time etc... In my Virtual box, it is set as 3600 (seconds), but when I run the command
dhcpclient eth0
, it assigns a new ipaddress and shows
approx 1400seconds
to renew my ipaddress. Since it is one of vulnerable webapp distro, my trouble is after 25minutes or something, it assigns new ipaddress and from testing BT5 attacker vm, couldnt connect to it... Though my settings in dhcp-client.conf has 3600seconds, I think it should show around 3xxx seconds rather than 1400seconds...
I did came across /etc/lib/dhcp3/dhcp-eth0-lease file, where it has got all the dhcp setting created with few more parameters like renew/rebind etc with datetime.
I'm not clear from where this 1400seconds is been set.
I have been searching thru and couldn't find answer to it...
Please do clarify me,
Cheers
Vp
Logged
eCPPT
lorddicranius
Sr. Member
Offline
Posts: 447
Re: DHCP Lease time
«
Reply #1 on:
December 30, 2011, 09:16:37 PM »
https://help.ubuntu.com/community/dhcp3-server
This page says the lease time is configured in /etc/dhcp3/dhcpd.conf.
Logged
GSEC, eCPPT, Sec+
l33t5h@rk
Jr. Member
Offline
Posts: 79
Re: DHCP Lease time
«
Reply #2 on:
December 30, 2011, 09:21:57 PM »
Quote from: lorddicranius on December 30, 2011, 09:16:37 PM
https://help.ubuntu.com/community/dhcp3-server
This page says the lease time is configured in /etc/dhcp3/dhcpd.conf.
Would think it is on srv side
Logged
lorddicranius
Sr. Member
Offline
Posts: 447
Re: DHCP Lease time
«
Reply #3 on:
December 30, 2011, 09:32:11 PM »
Quote from: l33t5h@rk on December 30, 2011, 09:21:57 PM
Quote from: lorddicranius on December 30, 2011, 09:16:37 PM
https://help.ubuntu.com/community/dhcp3-server
This page says the lease time is configured in /etc/dhcp3/dhcpd.conf.
Would think it is on srv side
Correct, sorry if my reply wasn't specific enough
Logged
GSEC, eCPPT, Sec+
vp75
Jr. Member
Offline
Posts: 78
Re: DHCP Lease time
«
Reply #4 on:
December 31, 2011, 07:46:03 AM »
Hi,
I remember going thru the same help while searched on google, my dhcp-client.conf file doesn't have entry for default, but just max-lease-time as 3600.
Not sure if anything else as a part of dhcp leasing, it updates as 1400seconds....
I will try with defaul-lease time entry and see if it changes any behaviour.
Cheers
Vp
Logged
eCPPT
HDCautism
Newbie
Offline
Posts: 20
Re: DHCP Lease time
«
Reply #5 on:
January 04, 2012, 09:20:05 AM »
DHCP in general, assigns ip addresses for a specified period of time, usually from 1 to 30 days. When the lease is about half used up, it sends a request to the server, asking if it can renew its current address. if the address is still available for that user, then the request is granted.
If you have dhcp lease time set to 3600 seconds (1 hour), that is IMO really really short. Do you have a reason that you want to generate all sorts of traffic asking to renew ip addresses every 30 minutes? I guess i could see if the network is wireless at a coffee shop, but for most businesses and home networks, 3600 seconds is really short.
Logged
ajohnson
Recruiters
Hero Member
Offline
Posts: 1060
aka dynamik
Re: DHCP Lease time
«
Reply #6 on:
January 04, 2012, 09:29:54 AM »
Quote from: HDCautism on January 04, 2012, 09:20:05 AM
Do you have a reason that you want to generate all sorts of traffic asking to renew ip addresses every 30 minutes? I guess i could see if the network is wireless at a coffee shop, but for most businesses and home networks, 3600 seconds is really short.
Yea, the lease is typically shortened for public/guest WiFi access that gets a lot of traffic. You could saturate your pool and have your users inadvertently DoS themselves if you leave the defaults.
I don't think traffic is a major in a client VM. It sounds like the OP wants to know
just because
Logged
WIP: GCFA |
www.infosiege.net
| @infosiege
The day you stop learning is the day you start becoming obsolete.
vp75
Jr. Member
Offline
Posts: 78
Re: DHCP Lease time
«
Reply #7 on:
January 04, 2012, 11:03:36 AM »
Hi,
I agree it is very short and as it is vulnerable app, I would like to change the leasetime more than 3600, but the problem is even if I change it, It is not taking the value from dhcpd.conf file. Somewhere else it looks like picking a value? couldn't find the entry for it...
I have checked the Tcpipguide website and its leasetime/dhcp allocation process, everything points at same file...OR might be I'm missing something....
V
Logged
eCPPT
ajohnson
Recruiters
Hero Member
Offline
Posts: 1060
aka dynamik
Re: DHCP Lease time
«
Reply #8 on:
January 04, 2012, 11:46:21 AM »
I misread your original post. The lease time is configured on the server side, which will be VirtualBox in this case. Googling
virtualbox dhcp lease time
shows this thread as #6, so you may not have a lot of luck in changing that.
To resolve the core problem where your IP changes after a period of time (which really doesn't make sense either since it should renew the lease and keep the same IP, as someone already stated above), why don't you just configure a static IP address?
Logged
WIP: GCFA |
www.infosiege.net
| @infosiege
The day you stop learning is the day you start becoming obsolete.
vp75
Jr. Member
Offline
Posts: 78
Re: DHCP Lease time
«
Reply #9 on:
January 04, 2012, 02:19:02 PM »
HI dynamik
thanks you mate, I did tried the static ip option. I have provided static ip as 192.168.0.20. When I run dhclient eth0, you wont believe it, i'm getting a ip allocated as 192.168.0.34
Also when it renews after n seconds, it is not assigning same ipaddress, it assigns the next increment (192.168.0.35)....strange...
Here the problem is, I couldn't identify from where it is getting this 192.168.0.34!!!!! I have been searching this now....
not sure If I will get imme answer, will update you soon.
V
«
Last Edit: January 04, 2012, 02:44:30 PM by vp75
»
Logged
eCPPT
lorddicranius
Sr. Member
Offline
Posts: 447
Re: DHCP Lease time
«
Reply #10 on:
January 04, 2012, 02:49:14 PM »
This machine that's receiving the 192.168.0.34 IP address, is this a virtual machine? Are you using Virtualbox as your VM software? If so, in the networking settings of this virtual machine, which setting are you using? If it's bridged, it's getting the address from a DHCP somewhere on your network. Is this computer that Virtualbox is installed on connected to a wireless router of some sort? If so, the VM is getting it's IP from that. If not, there's another DHCP server somewhere on your network. But if the VM is configured for NAT, internal, or host-only, then it's getting the IP address from the DHCP server that's build directly into the Virtualbox software.
Here's a page on networking when using Virtualbox:
http://www.virtualbox.org/manual/ch06.html
Sorry for my reply earlier, I passed right over "virtualbox" in your first post.
Logged
GSEC, eCPPT, Sec+
vp75
Jr. Member
Offline
Posts: 78
Re: DHCP Lease time
«
Reply #11 on:
January 04, 2012, 03:30:09 PM »
Hi Lorddicranius
You hit the point exactly, I'm using the VM which receives 192.168.0.34 set as bridged network. I believe it is getting thru my host (which is 192.168.0.3). I was under the assumption I can define a static IP in virtualmachine and it will be assigned with staticip...Looks like it is not doing it...
To further clarify, after reading thru the network settings, i have set it as NAT, which means, I cannot set ipaddress in the range of 192.168.0.xx series (so that it can be in private network), right ? , This VM being a victim vm and BT5 as attacker should also be configured in the same iprange as victim...? Am i right?
Thanks,V
Logged
eCPPT
ajohnson
Recruiters
Hero Member
Offline
Posts: 1060
aka dynamik
Re: DHCP Lease time
«
Reply #12 on:
January 04, 2012, 03:45:18 PM »
Oh, you were talking about DHCP in VirtualBox, and I thought you had it set to host-only networking or NAT. If it's bridged, it's going to be picking that address up off whatever you have serving DHCP on your LAN, which is probably your router.
Is this BT5 or another distribution (you didn't specify the victim OS)?
Also, how are you setting the static IP? If you run dhclient after setting that, it will wipe out whatever you set and use the DHCP address. That's to be expected.
When using NAT, you're going to get whatever ranges are configured in VirtualBox. I don't recall if they're on 192.168.0.0 or not. And yes, you'll need both systems on the same subnet unless you want to attempt setting up a router in between them (I suggest you get this working first though
).
I'm not trying to be rude, so please don't take this the wrong way, but I really think you should go back and focus on the basics before you get too carried away with attacking things. I think your limited networking knowledge is going to make nearly everything you try to do much more difficult than it needs to be. I suggest getting a Network+ or ICND1 book and going through one of those (whether you pursue the certification is up to you, but the knowledge will help you immensely regardless).
Logged
WIP: GCFA |
www.infosiege.net
| @infosiege
The day you stop learning is the day you start becoming obsolete.
HDCautism
Newbie
Offline
Posts: 20
Re: DHCP Lease time
«
Reply #13 on:
January 04, 2012, 04:15:14 PM »
Very true: virtual machines have a habit of inheriting certain settings from the host machine. Especially if/when you don't want them to. I suspect this is what's happening in this case with dhcp settings / static ip. (PS if you choose a static ip, be sure to choose one that's on the same subnet but outside the dhcp range, so you don't experience "duplicate ip address" problems).
Logged
vp75
Jr. Member
Offline
Posts: 78
Re: DHCP Lease time
«
Reply #14 on:
January 04, 2012, 04:26:21 PM »
Hi Dynamik & HDCautism,
Thanks for your suggestion,
I'm not taking rude, advice well taken
Its all part of learning....
Certain things which I read thru in websites (Google is friend) are not crystal clear personally even after trying practically, during that time, I seek you guys help/clarification. As you said , sure I will get to know more on networking side (but not cert level
). The harder the way I learn is a good base for my learning too.
. I'm glad you guys are here to help each other.
Back to issue, I have taken of staticip, (See these options I have been trying since yesterday, and some understanding from my side was not clear). Now i see myself clear on my understanding thru your answers.
Thanks buddy,
V
Logged
eCPPT
Pages: [
1
]
2
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
EH-Net
-----------------------------
=> Calendar Of Events
===> ChicagoCon 2007
===> ChicagoCon 2008s
===> ChicagoCon 2008f
===> ChicagoCon 2009s
=> Ethical Hacktivism
=> News Items and General Discussion About EH-Net
===> Greetings
=> Special Events
-----------------------------
Ethical Hacking Discussions and Related Certifications
-----------------------------
=> General Certification
===> Networking
===> OS
===> Security
=> Compliance, Regulations & Standards
=> Control Systems
=> Cyber Warfare
=> Forensics
===> CCE / MCCE - (Master) Certified Computer Examiner
===> CHFI - Computer Hacking Forensic Investigator
===> EnCE - EnCase® Certified Examiner
===> GCFA - GIAC Certified Forensics Analyst
=> Hardware
=> Incident Response
===> CSIH - Computer Security Incident Handler
===> GCIH - GIAC Certified Incident Handler
=> Malware
===> Advisories
=> Mobile
=> Network Pen Testing
===> CEH - Certified Ethical Hacker
===> CPTC - Certified Penetration Testing Consultant
===> CPTE - Certified Penetration Testing Engineer
===> CSTA - Certified Security Testing Associate
===> eCPPT - eLearnSecurity Certified Professional Penetration Tester
===> ECSA - EC-Council Certified Security Analyst
===> GPEN - GIAC Certified Penetration Tester
===> OSCP - Offensive Security Certified Professional
=> Physical Security
=> Programming
=> Social Engineering
=> Web Applications
=> Wireless
===> CWNP Certs
===> GAWN - GIAC Assessing Wireless Networks
===> OSWP - Offensive Security Wireless Professional
=> Other
-----------------------------
Columns
-----------------------------
=> Editor-In-Chief
=> Andress
=> Gates
=> Haddix
=> Hadnagy
=> Heffner
=> Hoffman
=> Linn
=> RichM
=> Murray
=> J. Peltier
=> Weidman
=> Wilson
-----------------------------
Features
-----------------------------
=> /root
=> Book Reviews
=> Opinions
=> Skillz
===> Examples
===> May 06 - Star Hacks, Episode V: The Empire Hacks Back
===> July 06 - Hack Bill!
===> Sept 06 - Netcat in the Hat
===> Nov 06 - Hitch-Hackers Guide to the Galaxy
===> Dec 06 - A Christmas (Hacking) Story
===> Feb 07 - Charlottes Web Site
===> April 07 - Microsoft Office Space
===> June 07 - Serenity Hack
===> Oct 07 - Worst. Ethical. Hacker. Challenge. Ever.
===> Dec 07 - Frosty the Snow Crash
===> March 2008 - It Happened One Friday
===> Oct 2008 - Scooby Doo and the Crypto Caper
===> Dec 08 - Santa Claus Is Hacking to Town
===> Feb 2009 - Brady Bunch Boondoggle
===> July 2009 - Prison Break
===> October 2009 - SSHliders
===> December 2009 - Miracle on Thirty-Hack Street
===> December 2010 - The Nightmare Before Charlie Browns Christmas
-----------------------------
Resources
-----------------------------
=> Career Central
===> Looking For Work
===> Looking To Hire
=> Links to cool sites.
=> Mass Media
=> News from the Outside World
=> Tools
=> Tutorials
===> Tutorial Requests
Loading...
Exclusive Deal
SANSFIRE 2013
June 15 - 22
5% Off
w/ Code
:
EHN_5
SANS Deals 4 EH-Netters
5% OFF
Any
SANS Course
in Any Format!
Coupon Code:
EHN_5
Including
SANS Rocky Mountain 2013
&
SANS Boston 2013
Polls
Compared to this year, 2013 will be:
Great!
Better.
About the same.
Little worse.
FUBAR!
Recent Forum Topics
Tools
: Symbolic Exploit Assistant project is looking for collaborators
(0) by
galapag0
Greetings
: Hi from the UK
(5) by
prats84
GCIH - GIAC Certified Incident Handler
: Passed my GCIH
(9) by
prats84
Network Pen Testing
: Want a challenge? Want a GXPN practice exam?
(0) by
ajohnson
News Items and General Discussion About EH-Net
: Change is Coming to EH-Net!!
(29) by
ajohnson
GCIH - GIAC Certified Incident Handler
: GCIH Free Practice test attempt
(1) by
prats84
EH-Net News Feeds
Latest Additions
Privacy Notice
for TDCC & All Properties
© 2013 The Ethical Hacker Network
Joomla!
is Free Software released under the GNU/GPL License.