Solved

Delete Mac route at startup

Posted on 2010-11-11
11
1,121 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

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…
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
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 …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

739 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