Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-27-2001, 10:09 PM   #1
LQ Newbie
Registered: Sep 2001
Posts: 2

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

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.
Old 09-27-2001, 10:37 PM   #2
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 -D

Old 09-28-2001, 01:15 AM   #3
LQ Newbie
Registered: Sep 2001
Posts: 2

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

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

If this command worked with the original ipfwadm 2.3, please
submit a bug report to `'. 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,
Old 09-28-2001, 11:13 AM   #4
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.



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 04:05 AM
How do I share my Internet Connection? sagi7ario Linux - Networking 3 03-16-2004 06:17 PM
Help! Cannot share my Internet connection... Domiriel Linux - Networking 2 11-25-2003 02:27 PM
how to share internet connection digihall7 Linux - Networking 2 09-23-2003 04:42 PM
HOW to share Internet connection zaldyd Linux - Newbie 1 07-25-2003 01:42 AM > Forums > Linux Forums > Linux - Networking

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

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