Solved

Delete Mac route at startup

Posted on 2010-11-11
11
1,123 Views
Last Modified: 2012-05-10
Everytime our Mac server boots up it adds in a route for 192.168.0/16.  When the server reboots I have to go in and delete this route.  Is there anyway I can have it automatically delete on startup, or not create it at all?
0
Comment
Question by:NorthAmerican
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 3
11 Comments
 
LVL 20

Expert Comment

by:woolnoir
ID: 34119075
The fact that its adding a route means it must be under the impression the network exists somewhere on one of its interfaces... is that range used anywhere within your organization ? or do you simply want it removed anyway ?

0
 

Author Comment

by:NorthAmerican
ID: 34123652
We have a 192.168.2.4 address set up to go to "lo4", but the route it is adding is 192.168.0/16.  We have other things on the network in that range that need to go out the default "en0" connection which is why I always have to delete the 192.168.0/16 route to be able to get to them.
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 34123661
what's the subnet mask set to on the lo4 interface ? is it set as a /16 ?
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:NorthAmerican
ID: 34123746
It's the loopback interface.  It's 255.255.255.255
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 34123762
and its not an option to have a different address on the lo4 interface ? it would appear that OSX is adding the route based on this, i admit that ive not seen this in the wild before.. I'll have a think.
0
 

Author Comment

by:NorthAmerican
ID: 34123781
Oops, the interface is actually lo0, if that makes any difference
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 34123824
check this page http://discussions.apple.com/message.jspa?messageID=5697532

the guy gives a nice post about adding static routes at startup, we could follow the reverse i.e

1. cd /Library/StartupItems
2. mkdir RemoteRoutes
3. cd RemoveROutes
4. Use your favorite editor (I recommend vi) to create a file named "RemoveRoutes" containing the following :


#!/bin/sh
#Tonyee, Tuesday, October 30, 2007

. /etc/rc.common

StartService ()
{
ConsoleMessage "Removing Static Routing Tables"
route del -net 192.168.0.0 255.255.0.0

}

StopService ()
{
return 0
}

RestartService ()
{
return 0
}

RunService "$1"

Open in new window

0
 
LVL 20

Expert Comment

by:woolnoir
ID: 34123828
then  ( sorry need to have multiple posts)
0
 
LVL 20

Accepted Solution

by:
woolnoir earned 500 total points
ID: 34123839
5. Create a file named "StartupParameters.plist" containing the following :

{
Description      = "Remove static routing tables";
Provides      = ("RemoveRoutes");
Requires      = ("Network");
OrderPreference      = "None";
}
6. chmod 755 RemoveRoutes StartupParameters.plist
7. Then reboot your computer, it's done.
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 34123846
that should work - i'm altering some guys script, and im not logged into OSX currently but it 'should' work. As always, take care :)
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 34123855
and its route delete rather than route del :)
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question