LinuxQuestions.org
Review your favorite Linux distribution.
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 02-26-2004, 10:33 AM   #1
kefen
LQ Newbie
 
Registered: Sep 2003
Location: singapore
Distribution: suse linux 9
Posts: 28

Rep: Reputation: 15
help sharing internet connection


i have a suse9 box connected to the net and my friends wanna share internet connection with me via a switch. i know a way of sharing is to use zebra or quagga, but i have no idea of how they work. i need help urgenly...
 
Old 02-26-2004, 11:45 AM   #2
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
How is your network set up ?
Since you are using SuSE 9.0, have you tried using YaST in order to congifure IP Forwarding ?

If you have two network cards, you can create your own Firewall and IP Masquerading by doing the following.
But you will need to deactivate the SuSE Firewall.

Create a file in the /etc/rc.d directory called initFirewall.sh and add the following to it.
Code:
#!/bin/bash

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

IPTABLES="/usr/sbin/iptables"
EXT="eth0"
INT="eth1"

$IPTABLES -P INPUT DROP
$IPTABLES -P FORWARD DROP
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A FORWARD -i $EXT -o $INT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A FORWARD -i $INT -o $EXT -j ACCEPT
$IPTABLES -t nat -A POSTROUTING -o $EXT -j MASQUERADE
NOTE: In this case, eth0 connects to the internet and eth1 connects to the local network. You may need to switch eth0 and eth1. The ifconfig command will give you more information.

You also need to change the permissions for initFirewall.sh
Code:
chmod 700 /etc/rc.d/initFirewall.sh
And, of course, you will have to append the following line to /etc/rc.d/boot.local
Code:
/etc/rc.d/initFirewall.sh
 
  


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
sharing my internet connection berrance Linux - Networking 1 02-25-2005 11:33 AM
SHaring internet connection bart59 Linux - Networking 1 01-27-2005 07:24 AM
Internet Connection Sharing geekbyday Linux - Networking 9 11-19-2004 10:59 PM
Internet connection sharing mark_booze Linux - Newbie 22 01-02-2004 12:37 AM
Internet Connection Sharing Chijtska Linux - Networking 7 09-02-2002 11:50 AM


All times are GMT -5. The time now is 02:24 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration