LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-14-2007, 07:01 PM   #1
moon_nader
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Rep: Reputation: 1
how i now ip who whith my in net work


how i now ip who whith my in net work


im root what is the command show my the ip and how i block him to make him never enter to my server

i used redhat interprice 5
 
Old 10-14-2007, 08:20 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
You can see all current connections with the netstat command. Example:
Code:
netstat -n --inet
Once you have the IP you want to block you can use iptables to block it. Example:
Code:
iptables -I INPUT -s 123.123.123.123 -j DROP
If this is not what you are asking please try to be more specific so we can better understand you.

EDIT: This assumes you are working on the server. If you working on the router use the FORWARD chain.

Last edited by win32sux; 10-15-2007 at 12:08 AM.
 
Old 10-15-2007, 12:02 PM   #3
moon_nader
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Original Poster
Rep: Reputation: 1
PHP Code:
[root@localhost ~]# netstat -n --inet
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 10.0.0.2
:46129              217.117.154.2:80            TIME_WAIT   
tcp        1      1 10.0.0.2
:41958              66.102.9.166:80             LAST_ACK    
tcp        0      0 10.0.0.2
:51674              91.121.12.213:80            TIME_WAIT   
tcp        0      0 10.0.0.2
:51675              91.121.12.213:80            TIME_WAIT   
tcp        0      0 10.0.0.2
:51673              91.121.12.213:80            TIME_WAIT   
tcp        0      0 10.0.0.2
:51671              91.121.12.213:80            TIME_WAIT   
tcp        0      0 10.0.0.2
:60029              205.234.175.175:80          ESTABLISHED 
tcp        0    520 10.0.0.2
:60030              205.234.175.175:80          LAST_ACK    
tcp        1      1 10.0.0.2
:46691              62.146.88.122:80            CLOSING     
tcp        0      1 10.0.0.2
:46686              62.146.88.122:80            LAST_ACK    
tcp        0      0 10.0.0.2
:59820              62.146.124.44:80            TIME_WAIT   
tcp        0      0 10.0.0.2
:56954              208.109.14.124:80           ESTABLISHED 
tcp        0      0 10.0.0.2
:56979              208.109.14.124:80           ESTABLISHED 
tcp        0      1 10.0.0.2
:43826              208.109.14.124:80           LAST_ACK    
tcp        0      0 10.0.0.2
:43804              208.109.14.124:80           ESTABLISHED 
tcp        0      0 10.0.0.2
:34328              64.179.4.146:80             ESTABLISHED 
tcp        0      1 10.0.0.2
:34322              64.179.4.146:80             LAST_ACK    
udp        0      0 10.0.0.2
:33059              10.0.0.138:53               ESTABLISHED 
udp        0      0 10.0.0.2
:33060              10.0.0.138:53               ESTABLISHED 
netstat
no support for `AF INET (sctp)' on this system. 
what the binfint from this command

==============================================================
i well tell you in my home i make server samab,nis,ftp and nis .
2 computer windows and 4 linux

i need command shwo my ip whoe enter for example to my network

i create user and ido ifconfig eth0 and i block the ip

i think is nmap but what the right command id open man nmap

i cant find any thing tallk abut who i now the ip


thank you
 
Old 10-15-2007, 12:13 PM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
If you run this netstat command on your router you will be able to see the active connections to your LAN. With that information, you can block specific IPs using an iptables command as above. The output you posted looks like it was run on a PC that had someone surfing the Web on it. I don't know what ifconfig and nmap would have to do with any of this. I wish I could be more helpful, I'm just honestly starting to think I don't really understand what you are asking at all.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
look for a piece of software which allow to manage a local net whith internet access jaxd Linux - Networking 2 09-03-2007 11:45 PM
tv-recording whith transcode and init whith v4lctl is not working with cron Goofy180173 Linux - Software 1 10-13-2006 12:54 PM
How to work with Sourceforge.net? kornerr Programming 1 10-08-2005 01:04 PM
p2p net not work johnnyX Linux - Networking 1 07-24-2004 01:44 PM
proplim my net work Kandil Linux - Networking 1 04-02-2004 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration