Operating System - HP-UX
1755702 Members
2838 Online
108837 Solutions
New Discussion юеВ

networking question, routing table

 
SOLVED
Go to solution
Shar Hunter
Frequent Advisor

networking question, routing table

Hello all,

I am trying to square away a routing issue. I currently use private ip 192.0.1.59 as the default gateway on our server. That goes to a simple DSL router for internet access. That router is configured to forward telnet requests to the server (192.0.1.1).

That works fine.

But I added a VPN network to a branch. The branch is on private subnet ip 192.0.2.0 0.0.0.255 And the VPN links the two networks together. Well in order for it to work I had to change the default gateway on the Unix server to use the private IP of 192.0.1.111 (this is the inside ip for the local VPN router).

But once I change the gateway i lose the ability to make it easy for customers to telnet into our server to use it. And also for employees to access it over the web.

So what I want to do is put the default gateway back to what it was, then gain internet access again. But to use a route command to route traffic from the 192.0.2.0 0.0.0.255 network through the local VPN router of 192.0.1.111

Seems simple enough. But I am not sure what the command is.

I would appreciate any feed back.

Thanks,

Troy
I don't think I'm in Kansas anymore.
8 REPLIES 8
linuxfan
Honored Contributor
Solution

Re: networking question, routing table

Hi Troy,

If I understand you correctly, you want to enable routing from you HP server to the new VPN network without changing your existing default gateway and using the 192.0.1.111 (your inside IP for VPN Local router), what you need to do is modify the /etc/rc.config.d/netconf and add

ROUTE_DESTINATION[1]="net 192.0.2"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]=192.0.1.111
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

This would make changes on subsequent reboots. To add this change right now, issue a command
"route add net 192.0.2.0 netmask 255.255.255.0 192.0.1.111 1"
This would add a route to your VPN network(192.0.2) using your local VPN router(192.0.1.111) as a gateway. This will affect your existing default gateway.

-Hope that helps
I am RU
They think they know but don't. At least I know I don't know - Socrates
linuxfan
Honored Contributor

Re: networking question, routing table

Oops,

The last statement should read, This will not affect your existing default gateway.

-I am RU
They think they know but don't. At least I know I don't know - Socrates
Shar Hunter
Frequent Advisor

Re: networking question, routing table

EXCELLENT

That worked great.

I used the following solution, on the fly.

route add net 192.0.2.0 netmask 255.255.255.0 192.0.1.111 1

Will this stay in the routing table if the server is re-booted? Or do I need to add the other solution as well?

----

Troy,

and thanks a lot!
I don't think I'm in Kansas anymore.
someone_4
Honored Contributor

Re: networking question, routing table

Hey Troy
the static route will be gone when the server is rebooted. Edit /etc/rc.config.d/netconf
for the routes to "Stick" after reboot. Or write a script that will execute on start up for and these routes.

Richard
linuxfan
Honored Contributor

Re: networking question, routing table

Hi Troy,

If you want this to be set after subsequent reboots, you will have to modify the /etc/rc.config.d/netconf. or like Richard said you will have create a script (make sure you test it out) and then make links in the /sbin/rc?.d directories but the easiest solution would be to modify the netconf file.

-Regards
I am RU
They think they know but don't. At least I know I don't know - Socrates
rick jones
Honored Contributor

Re: networking question, routing table

um, I might be wrong, but I thought that "Class C" private IP address space was 192.168.X.X. the implication being that 192.0.mumble could be real, live, Internet addresses.

if that is correct, your choice of "private" IP addresses might come-back to haunt you when you can no longer reach those real internet sites with 192.0 addresses.
there is no rest for the wicked yet the virtuous have no pillows
Joseph C. Denman
Honored Contributor

Re: networking question, routing table

Rick,

You are correct!!! 192.168 is reserved for private networks. I think our author may have a little trouble in the future.

I may be wrong...but, my two cents.

...jcd...
If I had only read the instructions first??
Shar Hunter
Frequent Advisor

Re: networking question, routing table

Yes it is true, 192.168.0.0 are reserved for Private networks, within the class C realm.

I inherited this network (in other words I am paid to
deal with it).

Most of the ip's will never touch the web, so it should never matter. Some do hit the web, but they are hiding behind a firewall. So again I did not think it would matter.

Although I am considering changing each of them anyway. Just to make it easier for the next guy/gal.

Thanks for all your help.


Troy
I don't think I'm in Kansas anymore.