LinuxQuestions.org
Visit Jeremy's Blog.
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 09-27-2001, 09:09 PM   #1
rocael
LQ Newbie
 
Registered: Sep 2001
Posts: 2

Rep: Reputation: 0
Question share internet connection on redhat 7.1


Hi!
I would like to know how to share the internet connection that I have in my redhat 7.1 box in ppp0 to my home network through a eth0 connected to a HUB.
Thanks.
 
Old 09-27-2001, 09:37 PM   #2
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
Use ipfwadm/ipchians/iptables.




The following commands may useful for u.


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

ipfwadm -F -a m 192.168.0.0/24 -D 0.0.0.0/0



Siddiqu.T
 
Old 09-28-2001, 12:15 AM   #3
rocael
LQ Newbie
 
Registered: Sep 2001
Posts: 2

Original Poster
Rep: Reputation: 0
your second command doesn't work!

Siddiqu,
After doing the echo command I did:
ipfwadm -F -a m 192.168.0.0/24 -D 0.0.0.0/0
and I got this:
[root@localhost /root]# ipfwadm -F -a m 192.168.0.0/24 -D 0.0.0.0/0
Unexpected argument `192.168.0.0/24'.

If this command worked with the original ipfwadm 2.3, please
submit a bug report to `ipchains@rustcorp.com'. Note that you
now need to be root, even to list the chains (complain to Alan Cox).

The best way to do this is to submit the output of `/sbin/ipfwadm --version',
the command used to obtain this error, any previous ipfwadm
commands, and the output of `ipchains-save'.

Then try flushing all the rules `ipchains -F; ipchains -X',
setting the DEBUG_IPFWADM variable `export DEBUG_IPFWADM=1' or
`setenv DEBUG_IPFWADM 1' and rerunning the command(s) which
caused this error.

Ain't an expert on this, can you tell me more,
Thanks
 
Old 09-28-2001, 10:13 AM   #4
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Ok forget what you've been told first decide what software you need.

Your using Redhat 7.1 so you should use a firewall on the Linux server that can do Network address translation. "NAT" or "MASQ" as it's called.

if you did a default install then ipchains is the default firewall software.

iptables is the netfilter firewall newer version of ipchians, but to make things simple start with ipchains.

So just to see if you can get NAT working on the linux box make sure the PC can ping the Linux box's ip address.
Then type this to allow NAT for the eth0 and dial out. "as root"

echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -F
ipchains -P input ACCEPT
ipchains -P output ACCEPT
ipchains -P forward ACCEPT
ipchains -A forward -i eth0 -j MASQ

Now set the default gateway on your PC to the Linux boxes ip address and set the DNS to your ISPs.

Now see if you can connect to the internet from the PC.

Note: this is not a firewall just a NATwall, you'll need to add rules to make it secure.

/Raz
 
  


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
What must i do in order to be able to share internet connection with RedHat 9? Julian_Thong Linux - Newbie 12 08-21-2004 03:05 AM
How do I share my Internet Connection? sagi7ario Linux - Networking 3 03-16-2004 05:17 PM
Help! Cannot share my Internet connection... Domiriel Linux - Networking 2 11-25-2003 01:27 PM
how to share internet connection digihall7 Linux - Networking 2 09-23-2003 03:42 PM
HOW to share Internet connection zaldyd Linux - Newbie 1 07-25-2003 12:42 AM


All times are GMT -5. The time now is 06:00 AM.

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