LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 08-27-2004, 03:45 AM   #1
extremebfn
Member
 
Registered: Jun 2004
Location: bloem
Distribution: asdsa
Posts: 43

Rep: Reputation: 15
Red face Setting Up Linux for GATEWAY


Hi..where can i get a nice HOW..TO on setting up a LINUX GATEWAY with IP MASQ en IPTables..... Most of the HOW..to's i had does not work....most of the commands in it does not work... PLEASE help....
 
Old 08-27-2004, 03:59 AM   #2
alexrait1
Member
 
Registered: Jul 2003
Location: Israel
Distribution: slackware current kernel 2.6.9
Posts: 70

Rep: Reputation: 15
Hey,
If this thread is already opened so I will add my experience and questions:
I was successful in getting my internet connection sharing wrok, though It only works if the pc which is not the gateway runs linux. This is how I did it:

on the gateay I have two NICs eth0 and eth1. eth0 is for the local netwrok. I connecto to the internet with a cable modem through eth0.

first I thought I had to assign ip to every pc on the netwrok:
on the gateway:
ifconfig eth0 broadcast 192.168.0.1 netmask 255.255.255.0

on the other pc:

ifconfig eth0 broadcast 192.168.0.2 netmask 255.255.255.0

next is to configure the iptables:

on the gateway:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward

and to assign a gateway to the other pc:
route add default 192.168.0.1 metric 1

and everything somehow works.

if you are doing the same on windows make sure, the ip assigned to eth0 remains as it is when you run ifconfig.... (and everything is still correct on the linux gateway).

Last edited by alexrait1; 08-27-2004 at 04:33 AM.
 
Old 08-27-2004, 04:30 AM   #3
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Rep: Reputation: 30
there seems to be loads of these threads... theres a nice little how to under the tutorials section.

http://www.linuxquestions.org/questi...ticle&artid=23
 
  


Reply



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
Setting Up Linux on a Gateway M520 Laptop drummergeek Linux - Laptop and Netbook 5 02-11-2005 09:19 AM
Setting up a gateway... beebs Linux - Networking 6 10-16-2004 04:26 PM
Gateway Setting ChangeOfPace Linux - Networking 4 05-05-2004 08:44 AM
Setting up linux as a gateway MDK9.0 MrCynical Linux - Networking 7 11-25-2002 07:08 PM
Setting up a Linux gateway machine inbar Linux - Networking 15 08-01-2001 10:08 AM

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

All times are GMT -5. The time now is 11:25 PM.

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
Open Source Consulting | Domain Registration