LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-13-2004, 11:34 PM   #1
Bassam
Member
 
Registered: Mar 2003
Location: Malaysia
Posts: 63

Rep: Reputation: 15
Sharing an Internet connection on Linux SUSE


Hi All,
I have a linux-SUSE based machine that contains 2 NICs (eth0 & eth1).
eth0 is connected to the WAN, and eth1 is connected to the LAN. I tried to give an Internet sharing to all users on the LAN through this box, but I faild.

I used to do the following in the redhat based boxes, but I faild with SUSE box:

1- create a file with the name rc.ipmasq in the directory /etc/rc.d
2- add the following rules to the file and save it:

#!/bin/bash
iptables -t filter -F
iptables -t nat -F
iptables -t mangle -F

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

3- chomd 755 rc.ipmasq
4- to lunch this firewall during the boot I added the following line at the end of /etc/rc.d/rc.local

In fact I couldn't find the file rc.local in the /etc/rc.d/ directory in the Linux SUSE

So any body can direct me to perform my requirment.


Regards
Bassam
 
Old 07-14-2004, 03:38 AM   #2
p8080
LQ Newbie
 
Registered: Oct 2003
Location: Wolverhampton
Distribution: Suse
Posts: 26

Rep: Reputation: 15
Hi,
It's much easier to use YAST2 - Security & users - Firewall.
tick the masquerade option together with any others you require and it will do the rest for you
the config file, if you need to do more config is /etc/sysconfig/SuSEfirewall2
 
Old 07-14-2004, 05:34 PM   #3
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
There's a very good IP Masquerading HOWTO on www.tldp.org. That's what I used and it works like a dream.

Last edited by adz; 07-14-2004 at 05:36 PM.
 
Old 08-13-2004, 09:23 AM   #4
dispare
LQ Newbie
 
Registered: Sep 2003
Location: just left of middle
Distribution: Ubuntu, Gentoo PPC, Slackware
Posts: 18

Rep: Reputation: 0
the file you are looking for is found at
/etc/rc.d/boot.d - in Suse 9.1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
internet connection sharing with suse 9.2 kkolo Linux - Networking 4 06-19-2005 07:24 PM
SuSE 9.0: Internet connection sharing vbraca Linux - Networking 6 03-17-2004 09:04 AM
Suse 8.0 Internet Connection Sharing ? cmisip Linux - General 0 11-04-2002 06:05 PM
internet connection sharing with SuSE 8.1 marsonist Linux - Networking 4 10-30-2002 12:06 PM
Internet Connection Sharing SuSE 8.0 Tezdread Linux - Networking 2 09-01-2002 05:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration