How can i share my Internet connection?

I’ve a home network with 2 PCs, the 1st using openSUSE 11.0, the second using both fedora 9 in side with WinXP

My modem is always connected to the 1st PC with openSUSE via usb (not via Ethernet), And it’s configured for PPPoE using a bridge mode. My modem is Sagem Fast 800 by the way

Any one can help me setting my openSUSE to share the Internet with fedora &/or WinXP? both are configured & ready, They just waiting the share from openSUSE.

Thanks in advance :slight_smile:

Hi bob-work. You probably need what windows users call ICS (internet connection sharing).

Microsoft calls the underlying process Network Address Translation. Its real name is IP masquerading.

Here’s a tutorial for IP masquerading in Linux: openSUSE ICS: Internet Connection Sharing (Linux IP Masquerading) with Suse or Windows Servers

Thank you for your reply, I already applied the steps except one which i encounter my problem, I took the help from openSUSE in this link: ICS - openSUSE
In the “External & Internal Interface” step, I just find my ethernet device (eth0) which i made it as Internal Zone.
But there is no External “my sagem device” as you can see

I’m nearly sure this problem because I didn’t configure my external connection via Yast -> Network Devices -> DSL
it doesn’t work, it does working before when my protocol was pppoa, but now it’s pppoe, so i configure my connection manually

Try to do it manually by

/usr/sbin/iptables -P FORWARD ACCEPT
/usr/sbin/iptables -t nat -A POSTROUTING -s <localnetworkaddress>/<netmask> -o <outinterface> -j MASQUERADE

Workstations should have IP address of this machine set as a gateway. Make shure that other iptables rules do not block the traffic.

OK, Let me see if i understood or else tell me what’s wrong! In the second command line, I’ll make it as this one


/usr/sbin/iptables -t nat -A POSTROUTING -s -o ppp0 -j MASQUERADE


My eth0 card is configured as follow:
IP Address:
Net Mask:

And I think the <outinterface> is my external zone which i’m connected to Internet as you mean, don’t you? if this is the case, so my External zone will be ppp0.

And my 2nd PC is configured as follow:
IP Address:
Net Mask:
DNS Server:
Default Gateway:

Is all these configurations are well?

Hi again!

/usr/sbin/iptables -t nat -A POSTROUTING -s -o ppp0 -j MASQUERADE

Here as <localnetworkaddress> you entered host address, not network. If you want to masq only one host, not all network, according to you configuration you should enter IP of the 2nd PC, not the gateway. So for network it should be:

for one host:

That’s well, I’ve just 1 host, so i won’t need to type this at all

the host’s IP (2nd PC) is, so the right command should be

/usr/sbin/iptables -t nat -A POSTROUTING -s -o ppp0 -j MASQUERADE

I think that’s it