LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-31-2004, 01:17 AM   #1
howareyou
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
i need help please


i have lan in my jop okay and i have adsl connection i give every one here in my work ip and all my clint use windows nt and 2000 and xp i need to give them connection from server liunx 9 okay ..
i put 2 card ethernet and let the first one have a normal ip from the adsl okay i need to shar this ip like in win2000 when i put 2 card ethernet i can put in the first one normal ip from the adsl connection and i can shar tthis connection and this sharing give the last ethernet ip 192.168.0.1 and i can maneg my network from this ip okay ..
if you need more information i can expline to you if you ask me okay ..
SIZE=3]what i need [/SIZE] i need to shar this ip in liunx 9 like i make in windows 2000
the first ethernet have ip 192.168.10.34 i need to make this sharing connection
please i need information becuase i don't know a lot about liunx
 
Old 03-31-2004, 02:20 AM   #2
lynos
Member
 
Registered: Mar 2004
Distribution: RedHat, Centos, Ubuntu
Posts: 52

Rep: Reputation: 15
Hi

You should configure your Linux box as a router. And NAPT should be enabled :

echo 1 > /proc/sys/net/ipv4/ip_forward (to enable packet forwarding)

iptables -t nat -A PREROUTING -s 0/0 -p tcp -i ppp+ -j DNAT --to 192.168.x.x: port (to enable particular port forwarding) )

iptables -t nat -A POSTROUTING -s 192.168.x.x/24 -d 0/0 -j MASQUERADE (to enable NAT )

regards.

==========
... lynos
 
Old 04-04-2004, 09:11 AM   #3
howareyou
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Original Poster
Rep: Reputation: 0
please more

i am sorry please expline this more to me
i wish you can make this
thank you for this information
 
Old 04-26-2004, 07:52 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
lynos actually gave you enough information - do info iptables and so on and get a book about networking and so on in your version of linux.

I have found it unwise to expect detailed, step-by-step, instruction from these kinds of message boards unless the answer you seek is technically tricky or finicky or obscure. You'll also find lots of questions and answers about networking problems like you describe on this board and in faqs everywhere. Linux rewards the patient and the diligent. Of course, you can always PAY someone to give you a solution???

From your message, you want to give people on your work LAN access to the internet via your ADSL modem? Is this correct?

If so, then you want to set up an interent gateway through your system... is your machine already a server for the LAN?

You could set your machine up as a router - so that LAN traffic can go to the internet and internet traffic gan go through the LAN via your machine. Of course, you may not be able to use your machine yourself while this is happening...

I believe Paul Sery has written some good references for Red Hat netwprks and gateways.

Consider this for Red Hat 9:

To configure a Linux computer as an Internet gateway requires you to configure the kernel to forward packets from one network interface to another --- between the LAN port and the Internet port. RHL turns off forwarding by default - so you have to turn it on.

You have two internet connection - the ADSL modem (external) and the ethernet (internal).

1. turn off the external connection (switch off the ADSL modem)

(You are going to turn on IP forwarding to enable transmission of network traffic between www and the LAN, which is a security hazard.)

Configuring the Gateway:

2. Add the appropriate internal and external connections to the gateway - so your LAN is probably eth0 and the ADSL is probably eth1 (You probably all ready have this set up).

3. Log in as root

4. From Gnome Menue, choose RUN Program

5. you're going to edit the sysctl.conf file in your favorite text editor...
.....look for a line which looks like "net.ipv4.ip_forward = 0"
.....change the zero into a one: "net.ipv.ip_forward = 1"
..... save

6. exit the editor

(in order for the change to take effect you have to restart Linux networking.
GNOME > Server Settings > Services > Network Service

7. click restart

Connecting the Gateway:

Previouse instructions take care of forwarding through the internet gateway. Now to configure the gateway.

I'm assuming the hardware (NIC etc) are already installed.

1. Assign an IP address to each NIC. eg
192.168.1.254 to internal (LAN = eth0)
192.168.32.254 to external (ADSL = eth1)

bear in mind these are only examples. Your configuration is almost certainly different.

note: the ADSL modem has probably already done this for you.

2. assign a default rout which points to your ADSL modem... however ADSL modems usually do this automatically!

LASTLY
- configure your computer and network parameters
(your computer is probably already configured with network and so on, you'll want a network name and an encryption key.)

- configure the dafault rout on each device to point to the internet gateway.
- repeat for each computer on the LAN

then you need to configure the firewall!
Simon
 
Old 04-27-2004, 10:36 AM   #5
howareyou
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Original Poster
Rep: Reputation: 0
thank you about this informathion i understand now how i can make this
thank you man for this
 
  


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



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

All times are GMT -5. The time now is 01:58 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