Howto setup a gateway thru opensuse11.3

Hi all,

I am not so very well in network-issues, so I have this situation:

I have a pc running openSUSE11.3, it uses a wireless card to connect to router (& internet). It has also a second eth0 card connected to a switch.
My settings are :wlan0 dhcp 192.168.1.161
eth0 fixed-ip 192.168.10.1

A second pc (fixed-ip 192.168.10.5) is connected to the switch also.

Now I want to let the first pc act as gateway for the second pc.

How do I setup this on both pc’s

On Tue January 25 2011 02:06 pm, ritslinux wrote:

>
> Hi all,
>
> I am not so very well in network-issues, so I have this situation:
>
> I have a pc running openSUSE11.3, it uses a wireless card to connect to
> router (& internet). It has also a second eth0 card connected to a
> switch.
> My settings are :wlan0 dhcp 192.168.1.161
> eth0 fixed-ip 192.168.10.1
>
> A second pc (fixed-ip 192.168.10.5) is connected to the switch also.
>
> Now I want to let the first pc act as gateway for the second pc.
>
> How do I setup this on both pc’s
>
ritslinux;

For the gateway you need to set up IP masquerading. This HowTo gives the
details.
http://opensuse.swerdna.org/suseics.html

For the clients:

Set up the clients as you would for a router.

  1. Assign an IP
  2. Set the gateway to the IP of the server. ( In your case 192.168.10.1) and
    finally
  3. Set the DNS servers to point to the IP of your ISP’s DNS server(s) or the
    Google public DNS servers. (8.8.8.8 and 8.8.4.4)

These can all be done in YaST.

If you do not know the IPs your ISP’s DNS servers, try looking on their web
site. You could also look inside /etc/resolv.conf on the server.


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

On Tue January 25 2011 06:51 pm, PV wrote:

> On Tue January 25 2011 02:06 pm, ritslinux wrote:
>
<snip>
>> How do I setup this on both pc’s
>>
> ritslinux;
>
> For the gateway you need to set up IP masquerading. This HowTo gives the
> details.
> http://opensuse.swerdna.org/suseics.html
>
<snip>
>
ritslinux;

I noticed that you are using dhcp to set the IP of your server. Although
Swerdna’s tutorial suggests a fixed IP for the internet interface (Wlan0 in
your case.) I think, but have not tested, that you could leave it as dhcp.

However if that does not work. You can give it a fixed IP (192.168.1.X where
x >1. You want to be sure the router does not assign that to a machine, so
log into the router ( Most likely 192.168.1.1) with a web browser and
configure dhcp to only assign IPs greater than say 192.168.0.50. In that
case 1<x<=50. This assumes your router is configured via a web interface as
most consumer level routers are. And it’s IP is 192.168.0.1 on the local
network.

I should have also sent you this link on configuring network cards:
http://opensuse.swerdna.org/susenic.html


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

@venzkep I haven’t actually tried the server internet-facing NIC with DHCP. It should work I suppose, would be good to know.