Redes - Parte 6
Redes - Parte 6
Redes - Parte 6
4 LT 2016
PRISMA 1.4
COM PREO
DE 1.0
VISTA A PARTIR
DE R$
44.490
Null Byte
Follow
World Home
How-To
Inspiration
Forum
Creators
How to Create a
Windows 10
Installation Disk
DevilMind
explaining Hacking
for Beginners!
12 Android Widgets
You Need on Your
Home Screen
occupytheweb
15K
2 years ago
Follow
4 Ways to Crack a
Facebook Password
and How to Protect
Yourself from Them
Popular Now
4 Ways to Crack a
Facebook Password
and How to Protect
Yourself from
Them
Related
How to Study for the White
Hat Hacker Associate
Certification (CWA)
How to Use Null Byte to
Study to Become a
Professional Hacker
Started)
ifconfig
The second line then contains information of the IP address, in this case,
192.168.1.114, the broadcast address (the address to send out information
to all IPs on the subnet), and finally the network mask (this is the info on
what part of the IP address is network and which part is hosts). There is a
lot more technical info there, but it's beyond the scope of a Linux basics
tutorial.
If we look down below to what appears to be a second paragraph, we see
the start of another paragraph with lo to the far left.
Newest
We can do this by using the ifconfig command with the interface we want to
assign the IP to and the IP address we want. Such as:
ifconfig eth0 192.168.1.115
Now, when we type ifconfig, we can see that our IP address has changed to
the new IP address.
Community
ANONS 4ANIMALS commented
on
on
published
commented on
on
on
We can also change the netmask and broadcast address, if necessary, such
as:
ifconfig eth0
192.168.1.255
192.168.1.115
netmask
255.255.255.0
broadcast
As you can see, the dhclient command sends out DHCPDISCOVER request
from the default NIC. It then gets an offer (DHCPOFFER) of 192.168.1.114
from the DHCP server, then confirms the IP assignment to the DHCP server.
Now, if we type ifconfig, we can see that the DHCP server has assigned a
new IP address.
on
By using the dig command with the mx option, we can get info on
WonderHowTo's email servers.
dig wonderhowto.com mx
The most common Linux DNS server is the Berkeley Internet Name Domain,
or BIND. In some cases, Linux users will often refer to DNS as BIND, so don't
be confused. DNS or BIND simply maps individual domain names to IP
addresses.
On our BackTrack system, we can point out DNS services to a local DNS
server or a public DNS server. This pointing takes place in the a plain text
tile named /etc/resolv.conf file. Let's open it with kwrite:
kwrite /etc/resolv.conf
As you can see, we are pointing to two public DNS servers to provide us
with DNS services. If we want to change our DNS servers or add another
server, we can simply add another line to this text file and save it. The next
time DNS services are required, the Linux operating system will look to the
new DNS server designated in this file.
Simple, right?
In my next Linux tutorial, we will look at security and permissions, so keep
coming back. If you haven't already, make sure to check out the first five
parts of this series, and if you have any questions, ask away in the
comments below or hit up the Null Byte forum for more help.
See Also
How to Study for the White Hat Hacker Associate Certification
(CWA)
How to Use Null Byte to Study to Become a Professional Hacker
The Essential Skills to Becoming a Master Hacker
Show More...
Subscribe
OFF
2 years ago
Reply
NAUGHT
Y CRISS
Guys, I have a problem on Kali. dhclient isn't working. when I write dhclient
eth0 in terminal it just says:
Reloading /etc/samba/smb.conf: smbd only.
RTNETLINK answers: File Exists
I surfed the web for a solution, somebody told me to enter this into
terminal:
root@kali:# vim /etc/init.d/samba
But that didn't work neither.
1
THE
BURNING
ONE
2 years ago
And by the way I installed tor but there aren't any executable or binary files
to run. I tried find -name tor, but can't find any binaries. And it's not in the
main applications menu.
1
THE
BURNING
ONE
2 years ago
1
HORLS
KAYS
Reply
Reply
here is the best way to install most software easily on kali: go to system
tools-add/remove software, an interface pop up, enter the software you
want to install e.g tor, list of software will be shown, choose the best that
Reply
Burning:
What are you trying to do? Are you trying to get an IP from the DHCP server?
OCCUPYT
HEWEB
OTW
2 years ago
Reply
i really learned a lot from this series! well written, easy to understand and
instructive
1
MERT
BAHADIR
2 years ago
Reply
Mert:
OCCUPYT
HEWEB
I'm glad you enjoyed this series and hope you will come back for more.
There is SO much more coming!
OTW
2 years ago
1
MERT
BAHADIR
@otw;
actually, i just simply registered this site to thank you personally. can't
wait to see (and learn of course) from you!
2 years ago
1
JARED
MESSER
DRAGON
HUNT3R
Reply
how to change my subnet? i mean what cmd should i use? because you told
me before that my and victim's PC have same subnets so i have to change
it. so how to do them? what cmd shall i use
2 years ago
Reply
Reply
Reply
Dragon:
I would recommend that you read the articles on networking that are cited
in the first paragraph. This will help you brush up on networking
fundamentals. Every hacker needs a good grasp of networking to be
successful.
OCCUPYT
HEWEB
OTW
2 years ago
1
NEMESIS1
512
Reply
Reply
Nemesis:
Good catch! Yes, in Linux it should be ifconfig and ipconfig in Windows. Its
correct in the screenshot. I made the correction in the text.
OCCUPYT
HEWEB
Thanks
OTW
2 years ago
1
STEVEN
SENZ
Reply
Reply
2 years ago
Reply
OCCUPYT
HEWEB
When i use "ifconfig" while im connected to the internet i get, not 2, but 3
connections. eth0, lo and wlan0.
1
GUILHER
ME
ALVAREN
GA
And everything you said that i should see on ''eth0'' I see on wlan0.
I disconnected and typed "ifconfig" again and then i had only eth0 and lo,
but my ip address/netmask/broadcast etc wasn't showing on eth0.
And while i was connected to the internet and i changed my ip address
using "ifconfig wlan0 xxx.xxx.xx.xx'' my internet went down.
Could you explain me why everything happened that way? Thank you very
much for all your tutorials and quick answers.
God job!
1 year ago
Reply
Guilherme:
A fundamental understanding of networking is critical to becoming a
good hacker.
OCCUPYT
HEWEB
Reply
Oh, okay.
I'll keep reading your tutorials and any other doubts i'll ask you.
1
GUILHER
ME
ALVAREN
GA
Reply
I'm sorry, but I'm trying to change my IP address, while still also being able
to access the internet, but it seems impossible, would you be able to help
me with this?
1
NEMESIS1
512
Thank you,
Nemesis1512
1 year ago
Reply
Nemesis:
I'm presuming you are behind a NAT device and you have a private IP. If
that is the case, you can't change your IP and still access the Internet.
Well...at least no simple way.
OCCUPYT
HEWEB
OTW
1 year ago
1
NEMESIS1
512
Do you think you will be doing a tutorial in the (near) future of how to
change one's private IP then?
Thank you,
Nemesis1512
1 year ago
OCCUPYT
HEWEB
1 year ago
Thank you,
Nemesis1512
Reply
OCCUPYT
Reply
1 year ago
Reply
NEMESIS1
512
Reply
Reply
OCCUPYT
HEWEB
OTW
GUMSKU
LL4
Reply
Gumskull:
An internal IP is behind a NAT device and the IP's are not routeable. Usually
used internally on a LAN. A broadcast IP is simply an IP that sends a
message to ALL IP's on the internal network.
OCCUPYT
HEWEB
Reply
Sorry. In the tutorial you showed that we could change our IP's manually so
I changed it but also tried to change it back the same way but it still kept me
disconnected from the internet so I rebooted my PC to see if it would work
and it did. I then went on to the next part of the tutorial where it said that if
I were to type dhclient it would change my IP. At this point I didn't realise
that meant that it would change it back to the original IP address. Long
story short I figured it out. Thanks for the info on internal IP's and broadcast
IP's though.
1
GUMSKU
LL4
1 year ago
1
LUIGI
MACKENZ
IE C.
BRITO
Reply
IT didn't change back to your 'original' Ip address. Its how dhcp server
works. it gives you the first available IP address in an DHCP pool. when
you changed your Ip address manually you freed the IP you once had.
When you typed dhclient, you got that same IP cause It's the first
available.
Try this. Turn on PC1. Then Turn on PC2. Turn off PC1, then type dhclient
on PC2. You'll see that you will get the IP address PC1 once had. Thanks
1 year ago
Reply
You said why would one want to connect to the Internet after changing the
IP address. Then why does one change his IP address?
1
CHANDA
N
1 year ago
Reply
Chanda:
I think you misunderstood. I was saying that you wouldn't want to change to
a static IP and connect to the Internet.
OCCUPYT
HEWEB
OTW
1 year ago
1
CHANDA
N
1
STEVEN
SENZ
Reply
Reply
Sorry for the delay in responding to you suggesting about rebooting the
interfaces, I tried the following command sudo / etc/init.d/networking
restart and got the following back:
Reconfiguring network interfaces
ignoring unknown interface eth0=eth0.
My understanding is that eth0 is the default port. how can his interface be
unknown to the system?
I also did a nmap of my system (127.0.0.1) and got back all 1000 scanned
ports on localhost are closed
I figured out the problem after reading several other posts.
I used rwrite to check the /etc/networking/interfaces program and found
that the line iface eth0 inet dhcp was commented out. Once I removed the #
from the start of the line - everything worked fine.
So I have the port open and everything is working again - however If anyone
could tell me what caused the port command line to be commented out, it
would be appreciated.
BTW- I am leaving the post here - just in case anyone else has similar
problems.
Regards
1 year ago - edited 1 year ago
Reply
Steven:
OCCUPYT
HEWEB
First, eth0 is not a port, it is an interface. You need to make that ket
distinction in the future.
Second, 127.0.0.1 is your loopback/home IP address. It is only for internal
work. It can not be seen from the outside.
OTW
1 year ago
Reply
Hello,
ANTONY
HAWKIN
GS
I tried the dig command while not using my regular IP (I also changed the
network part with "ifconfig" and didn't change it back with "dhclient"). It
wasn't able to assign any IP's for the URL's. Is this because the destination IP
wasn't the one of my router anymore, so it wasn't able to get out of my
subnet?
And the mx "postfix" somehow doesn't work for me for every domain
name. I didn't get any mail adresses although they actually should (such as
youtube). Did I missunderstand the term mail server?
Antagonist
1 year ago
Reply
Sir
When i do dhclient this happens
Reloading /etc/samba/smb.conf: smbd only
1
PRANAV
VATS
When i do it again
Reloading /etc/samba/smb.conf: smbd only
RTNETLINK answers: File exists
What should be the problem
Thank you
Pranav
1 year ago - edited 1 year ago
Reply
Reply
LUIGI
MACKENZ
IE C.
BRITO
OCCUPYT
HEWEB
1
HAITIAN
DUCK
Reply
Reply
Oh yeh continue:
After I open google homepage successfully (the one after dhclient).
I typed ifconfig again. Its the latter IP.
192.168.0.97
So is it true that at this moment, the LAN modem accept my new static
ip?
1
HAITIAN
DUCK
1 year ago
Reply
Because dhclient grabs an IP address from the DHCP server. That means
that the router now knows who you are and can route your traffic out to
the internet.
1
OCCUPYT
HEWEB
1 year ago
Reply
Hello,
I tried dhclient command on the terminal.
To which, the reply prompt was
RTNETLINK answers: Operation not permitted
1
SHALVIN
KUMAR
Reply
1
OSCAR
MIKE
Reply
kwrite is only found in KDE versions of Linux. If you are using Kali, try using
leafpad.
1
OCCUPYT
HEWEB
leafpad /etc/resolv.conf
11 months ago
Reply
thanks a lot! i was searching everywhere for a sloution. thanks for the help
OTW!! and great tutorial!!
1
OSCAR
MIKE
11 months ago
Reply
Reply
THELION
KING
hi where is part 7 and 8 of hack like pro linux basics for aspiring hacker
9 months ago
Reply
B25N3
SAWARI
Reply
OCCUPYT
HEWEB
1
FLYING
SPIRIT
Hi OTW !
I got a question asked before. Despite advices in comments and all research
on web I can't make works dhclient command.
Example :
ifconfig (IP : 192.168.1.101)
dhclient (Error : Reloading /etc/samba/smb.conf: smbd only)
So I tried
dhclient -r (Error : Reloading /etc/samba/smb.conf: smbd only)
ifconfig (IP : UP BROADCAST RUNNING MULTICAST)
dhclient (Nothing)
ifconfig (IP : UP BROADCAST RUNNING MULTICAST)
Why have I this error ? I don't understand what this means. The only way to
change my IP is manually with ifconfig.
Thanks for your help !
7 months ago - edited 7 months ago
Reply
7 months ago
Reply
OCCUPYT
HEWEB
7 months ago
Reply
FLYING
SPIRIT
Wireless?
7 months ago
Reply
OCCUPYT
HEWEB
Questions:
Are you running as root?
Any further info in the logs?
1
DILL _
Reply
FLYING
SPIRIT
Reply
Good eyes OTW. Try specifying the network interface (mine is wlan1,
yours might be different).
root@Kali:~# dhclient wlan1
If that doesn't work try disconnecting from your WiFi and then
reconnecting to it.
The easiest way to view the logs would be
Applications > System Tools > Log File Viewer
They are also located in var > log > syslog
It is probably showing multiple lines that say
Kali dhclient: No broadcast interfaces found - exiting.
1
DILL _
7 months ago
Reply
1
FLYING
SPIRIT
The logs seem to indicate a proper DHCP lease. You don't then
have an IP address after it says bound to 192.168.1.10? If you then
do ifconfig you don't have an IP address for wlan0?
1
DILL _
7 months ago
1
FLYING
SPIRIT
DILL _
Reply
Reply
Reply
I miss understood your issue. I thought you were saying that you weren't
getting an IP address at all from DHCP and had to manually assign one.
The client will most likely get the same IP address from the DHCP server. In
fact if you run a packet capture during the release/renew process you will
see that the client asks for the old IP address even after releasing it back to
the server. This is because the client still stores it's previous leases and try's
to simplify things by asking for what it already knows. If the server hasn't
handed out the IP address it will gladly hand it back to the client.
This goes for the DHCP server also. It has cached it's leases and when the
client identified by it's MAC address asks for a lease it will hand it the
previous one. This can be viewed by clearing the previous DHCP leases on
the client and then run a packet capture during the release/renew process.
The client will specify any IP address and the server will give it it's old IP
address.
Reply
FLYING
SPIRIT
Reply
The IP address in this case would only affect the LAN segment your kali
machine is connected to, not your public of WAN IP address what most
hackers are trying to hide. If you are hacking on say a public LAN then really
the danger here would be your MAC address, and spoofing it would be the
best idea (host name also).
1
DILL _
7 months ago
Reply
I don't know how to spoof my MAC address and hide my public IP yet,
but I'm on my way. You really know what you talking about ! :-)
1
FLYING
SPIRIT
7 months ago
Reply
Hello!
ZERO_ME
Reply
same case with me. Getting exact errors as above. Please help
3 months ago
Reply
ROBO
COP
3 months ago
Reply
ELLIOT
ALDERSO
N
Are you using Kali 2.0? I'm using Kali 1.1 and it works fine.
3 months ago
Reply
OCCUPYT
HEWEB
I use ParrotSecurity OS
3 months ago
Reply
ELLIOT
ALDERSO
N
We are using Kali Linux here on Null Byte. Must be a bug in ParrotSec.
3 months ago
OCCUPYT
HEWEB
Reply
Reply
ELLIOT
ALDERSO
N
ATTACH
DevilMind explaining
Hacking for Beginners!
Arts
Lifestyle
Gaming
Alcohol
Business & Money
Dating & Relationships
Diet & Health
Family
Fitness
Food
Home & Garden
Hosting & Entertaining
Language
Motivation & Self Help
Outdoor Recreation
Pets & Animals
Pranks & Cons
Spirituality
Sports
Travel
Gambling
Games
Hobbies & Toys
Magic & Parlor Tricks
Video Games
WonderHowTo.com
About Us
Privacy Policy