Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Apr 19, 2024 4:44 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Linux PC don't show ip
PostPosted: Mon Mar 02, 2009 4:22 pm 
Offline
Newbie

Joined: Mon Feb 23, 2009 2:29 am
Posts: 12
System ifconfig:[code]
eth0 Link encap:Ethernet HWaddr 00:11:2f:27:32:e9
ВВЕРХ BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
коллизии:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Прервано:20 Base address:0xa800

lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Диапазон:Узел
ВВЕРХ LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:14902 errors:0 dropped:0 overruns:0 frame:0
TX packets:14902 errors:0 dropped:0 overruns:0 carrier:0
коллизии:0 txqueuelen:0
RX bytes:7606243 (7.2 MB) TX bytes:7606243 (7.2 MB)

wlan0 Link encap:Ethernet HWaddr 00:1f:c6:46:d2:99
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21f:c6ff:fe46:d299/64 Диапазон:Ссылка
ВВЕРХ BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:77011 errors:0 dropped:0 overruns:0 frame:0
TX packets:48503 errors:0 dropped:0 overruns:0 carrier:0
коллизии:0 txqueuelen:1000
RX bytes:100380881 (95.7 MB) TX bytes:4749190 (4.5 MB)
Прервано:19 Память:ad000000-ad002000[/code]
Connected thru wlan0
Just change
[code] # Bind the primary IP of the computer to eth0.
if [ "$net_connection_id" = "eth0" ]; then
net_primary_ip="$net_ip"
fi[/code]in audit_linux.sh but it's not good.
Need help


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 03, 2009 5:17 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
Try the attached script. I moved the net_primary_ip out of the network interface loop. I made it so the IP is grabbed based on the interface tied to the gateway given by 'route -n'.

It works for me and I use a bridged interface, so it uses the IP I have set for interface br0.


Attachments:
audit_linux.sh.zip [20.41 KiB]
Downloaded 321 times

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2
Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 07, 2009 7:19 am 
Offline
Newbie

Joined: Mon Feb 23, 2009 2:29 am
Posts: 12
Work beautifull - thanks


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group