PortSentry: How To Delete an Entry in Routing Table

This is a discussion on PortSentry: How To Delete an Entry in Routing Table within the Linux Security forums, part of the System Security and Security Related category; While experimenting with PortSentry, I performed an nmap scan on my box from another box to make sure PortSentry was ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-23-2005
M_F_H
 
Posts: n/a
Default PortSentry: How To Delete an Entry in Routing Table

While experimenting with PortSentry, I performed an nmap scan on my box from
another box to make sure PortSentry was working. As expected, both the
/etc/hosts.deny file and the routing table got updated. Now I want to undo the
changes that PortSentry did. That's an easy edit of the hosts.deny file, but
fixing the routing table baffles me. Here's the routing table:

Destination Gateway Genmask Flags Metric Ref Use Iface
208.24.128.3 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
207.20.142.137 - 255.255.255.255 !H 0 - 0 -
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 208.24.128.3 0.0.0.0 UG 0 0 0 ppp0

Question: How does one flush the line that has the flag "!H"? TIA...
Reply With Quote
  #2 (permalink)  
Old 06-23-2005
Filip Pawlak
 
Posts: n/a
Default Re: PortSentry: How To Delete an Entry in Routing Table

Dnia 23.06.2005 M_F_H <no_one@example.com> napisał/a:
> While experimenting with PortSentry, I performed an nmap scan on my box from
> another box to make sure PortSentry was working. As expected, both the
> /etc/hosts.deny file and the routing table got updated. Now I want to undo the
> changes that PortSentry did. That's an easy edit of the hosts.deny file, but
> fixing the routing table baffles me. Here's the routing table:
>
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 208.24.128.3 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
> 207.20.142.137 - 255.255.255.255 !H 0 - 0 -
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
> 0.0.0.0 208.24.128.3 0.0.0.0 UG 0 0 0 ppp0
>
> Question: How does one flush the line that has the flag "!H"? TIA...


for BLE in `route | grep "\!H" | awk '{print $1'}`; do route del $BLE; done


--
::( Filip Pawlak Jabber: filippawlak@chrome.pl ):
::( fp@actionmag.pl GG: 4633099 ):
Reply With Quote
  #3 (permalink)  
Old 06-23-2005
M_F_H
 
Posts: n/a
Default Re: PortSentry: How To Delete an Entry in Routing Table

M_F_H wrote:
> While experimenting with PortSentry, I performed an nmap scan on my box
> from another box to make sure PortSentry was working. As expected, both
> the /etc/hosts.deny file and the routing table got updated. Now I want
> to undo the changes that PortSentry did. That's an easy edit of the
> hosts.deny file, but fixing the routing table baffles me. Here's the
> routing table:
>
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 208.24.128.3 0.0.0.0 255.255.255.255 UH 0 0 0
> ppp0
> 207.20.142.137 - 255.255.255.255 !H 0 - 0 -
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0
> eth0
> 0.0.0.0 208.24.128.3 0.0.0.0 UG 0 0 0
> ppp0
>
> Question: How does one flush the line that has the flag "!H"? TIA...


Answer:
From the configuration file, /etc/portsentry.conf, PortSentry performs this
command when it detects a scan:
route add -host 207.20.142.137 reject

Therefore, it is reasonable to assume that to restore the route, perform this:
route del -host 207.20.142.137 reject
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:59 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0