- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Unable to disable the default gateway in HPUX 11.3...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 07:57 AM
тАО10-23-2016 07:57 AM
Unable to disable the default gateway in HPUX 11.31
Dear TEam,
I am trying to isolate one of my server from WAN by disabling the default gateway from the config file in the path.How ever i can still ping my server from differenet network.Blow are the steps i followed
edited /etc/rc.config.d/netcont
Disabled the below line
#ROUTE_GATEWAY[0]="x.x.x.x"
/sbin/init.d net stop
/sbin/init.d net start
How ever when i give the below command i can still find the gateway in the routing table
#netstat -nr
Wierd thing is that even though i stop the net service i am able to ping the ip from different network.Kindly help me in fixing this issue. As its stopping my in proceeding with my activity which needs the server to be isolated from the network.
Regards,
RKJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 08:25 AM
тАО10-23-2016 08:25 AM
Re: Unable to disable the default gateway in HPUX 11.31
> [...] i can still find the gateway in the routing table [...]
Does "route delete [...]" remove it? Does it reappear after a full
reboot?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 09:29 AM
тАО10-23-2016 09:29 AM
Re: Unable to disable the default gateway in HPUX 11.31
i have rebooted the server and tried editing the netconf file and stopped the net service howver still i am facing the same issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 09:31 AM
тАО10-23-2016 09:31 AM
Re: Unable to disable the default gateway in HPUX 11.31
why is that even if i stop the net service i am able to ping the ip from the different VLAN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2016 01:13 PM
тАО10-23-2016 01:13 PM
Re: Unable to disable the default gateway in HPUX 11.31
> > [...] i can still find the gateway in the routing table [...]
>
> Does "route delete [...]" remove it? [...]
Still wondering.
> why is that even if i stop the net service i am able to ping the ip
> from the different VLAN
I don't know. I can't see what you're doing. I don't know which
"the ip" address you're testing, or what is in your
"/etc/rc.config.d/netcont" file.
> /sbin/init.d net stop
>
> /sbin/init.d net start
Do you mean commands like the following?:
/sbin/init.d/net stop
/sbin/init.d/net start
Or did you actually do what you said you did?
As usual, showing actual commands with their actual output can be
more helpful than vague descriptions or interpretations. Hiding
important details (such as "x.x.x.x") may be less than helpful, too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2016 02:49 AM
тАО10-24-2016 02:49 AM
Re: Unable to disable the default gateway in HPUX 11.31
HI,
Yes i was able to delete the default gateway through route delete.
I have edited the netconf file located in the path /sbin/init.d/netconf and commented the below entries
#ROUTE_DESTINATION[0]="default"
#ROUTE_MASK[0]=""
#ROUTE_GATEWAY[0]="16.148.240.1"
#ROUTE_COUNT[0]="1"
#ROUTE_ARGS[0]=""
#ROUTE_SOURCE[0]=""
saved the file and executed the below commands
#/sbin/init.d/net stop
#/sbin/init.d/net start
but when i went a printed the command # netstat -nr
i was able to get the below output
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
16.148.253.170 16.148.253.170 UH 0 lan0 32808
16.148.248.0 16.148.253.170 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 32808
default 16.148.248.1 UG 0 lan0 1500
I am using HP-UX 11.31
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2016 02:42 AM
тАО10-28-2016 02:42 AM
Re: Unable to disable the default gateway in HPUX 11.31
(boy it's a long time since I posted on here!)
First point I'd make is there is no such file as /sbin/init.d/netconf - I presume you mean /etc/rc.config.d/netconf ??
Secondly the /sbin/init.d/net command doesn't do anything on "net stop"
Probably because it's a shutdown script and tearing down an IP interafce and routes doesn't really need to happen during shutdown. We could aregue the sense of that all day, but it doesn't do it, so removing that line and running net stop/net start isn't going to remove that route entry. Here's the main code snippet code from /sbin/init.d/net:
########## # main # ########## case $1 in start_msg) print "Configure LAN interfaces" exit $OKAY ;; stop_msg) print "Unconfigure LAN interfaces" exit $OKAY ;; stop) exit $OKAY ;; start) ;; # fall through *) print "USAGE: $0 {start_msg | stop_msg | start | stop}" >&2 exit $ERROR ;; esac
As you can see, net stop doesn't do anything. And running net start is only going to *add* any routes listed in the /etc/rc.config.d/net config file, not delete any existing ones.
So theere are 2 ways to acheive what you want:
1. Follow Steven's advice and use the route delete command
2. Reboot your system - then it will come back up with an empty route table and the commented out entry in /etc/rc.config.d/netconf won't get added
I am an HPE Employee
