Operating System - HP-UX
1833896 Members
1661 Online
110063 Solutions
New Discussion

Connecting to the internet through gateway

 
Werner Rips
Advisor

Connecting to the internet through gateway

Hello,
I have a LAN with several HPUX Workstations
running 10.20 and 11.0. One HPUX11.0 system
has a dialup connection to the internet that
is working fine.
Can someone tell me how to configure this
system that it works as gateway to the
internet for all the others?
1. How do I have to configure the gateway?
2. How do I have to configure the other machines?
4 REPLIES 4
Richard Darling
Trusted Contributor

Re: Connecting to the internet through gateway

Werner, I have some partial info. - I find that I can solve problems sometimes getting snippets from different people...

We have an L1000 that I have our users telent into over the internet. We go through a DSL router. Here is what I did:

1)setup route to the gateway (router):
# route add net 0.0.0.0 n.n.n.n 1
where n.n.n.n is the address of the gateway.

# netstat -rvn


2) Add the internal gateway IP address to the /etc/hosts file.
n.n.n.n gateway name

Hope this can be of some help...
Richard
Werner Rips
Advisor

Re: Connecting to the internet through gateway

Richard,
thank you for assistance, but with my client machines I cannot reach the internet e.g. with ping.
I tried to ad entries to the routing tables with add route but all I get is network is unreachable.

On the machine that holds the dialup connection to the internet with ppp I added a default route with "route add default 212.144.100.90 1".
I have nsswitch.conf and a resolv.conf files. Copied them to the client machine.

Please tell me how to add a route to the client so that I can reach
the internet.
RikTytgat
Honored Contributor

Re: Connecting to the internet through gateway

Hi,

On the client machines, when you set the default gateway using route, be sure to use the LAN address of the server, and not the WAN (PPP) address.

Also, the server must be configured for IP forwarding. On a HP-UX 11 system, you can check this using the command

ndd -get /dev/ip ip_forwarding

A value of 1 or 2 should be OK (ndd -h ip_forwarding prints what the variables mean: ndd -h ip_forwarding).

Hope this helps,
Rik
Herve BRANGIER
Respected Contributor

Re: Connecting to the internet through gateway

Hi,

To connect your HP boxes to Internet accross
HPUX 11 gateway you need to use official Internet address. If you configure your
GateWay to forward IP Packets you need to use
official IP. If you have one external IP address (the HPUX 11 box' one) you can't just
send your packets. For example : if your
Internal server's IP is 192.168.1.12, NO
machine can reply, because this adress can't
be routed.

In this case you can use NAT (Network Address
Translation) for example (but this feature is
not supported by HPUX11, you need to use
firewall software or try with a Linux box).
NAT feature replace internal IP @ by the
gateway IP adress, so you just need one IP to
connect to Internet.

You can also use a proxy software. It really
simple to configure. For example if you just
need to use web you can install Squid. If you
want to use more services you can try the FWTK
(http://www.fwtk.org).

You can also see :
http://cheops.anu.edu.au/~avalon/ipf-mentat.html
it's an unofficial NAT for HPUX 11.

To really help you I think we need to know
a part of your network topology ( Internal
IP subneting, ...)

Herv?