Author Topic: RH 7.3 internet connection sharing  (Read 743 times)

ims27_8

  • Member
  • **
  • Posts: 45
  • Kudos: 0
RH 7.3 internet connection sharing
« on: 25 September 2002, 05:13 »
my uni / job work has died down for a while, so i'm starting to fiddle around with linux again. I've got red hat 7.3 installed, and i can access the internet (using my cable modem connected to eth1). I have 2 NIC's, one for the modem and one for my home network. How do i go about setting up ICS so that a windows 98 computer can access the internet over the network?

Stryker

  • VIP
  • Member
  • ***
  • Posts: 1,258
  • Kudos: 41
RH 7.3 internet connection sharing
« Reply #1 on: 25 September 2002, 21:41 »
I will assume you are using pico as it is the easiest text editor (in my opinion) for this activity.
as root:

$ pico /etc/sysconfig/network
/*
set GATEWAY=<your private ip address for your lan for the server>

set GATEWAYDEV=ppp0 (or whatever your internet device is)

*/
CTRL+X to exit (choose yes and override the file)

pico /etc/sysctl/conf

/*
set net.ipv4.ip_forward = 1
*/
CTRL+X

pico /etc/sysconfig/ipchains

/*
at the top make sure you have:
:input ACCEPT
:forward ACCEPT
-P forward DENY
-A forward -i ppp0 -s <ipaddress>/<netmask> -j MASQ
 : output ACCEPT (There is no space there, i needed it for that silly face)
*/

CTRL+X
chkconfig ipchains on
/etc/init.d/network restart
/etc/init.d/ipchains restart

That should do it for you, on the client machines you will need to set the route to the server's ip.
for windows (i will regret saying this):
start->settings->control panel->network
doule click the interface that supports connecting to the linux router (Example: 10/100mbps ETHERNET Adapter)
click the gateway tab, type the ip address of the router.... (you know what to do here)
click the DNS Configuration tab, type in the number of the DNS server that you use to resolve addresses on the internet (I use 4.2.2.1 and 4.2.2.2)
reboot


I applogize to everyone for the windows info... I was focusing on the linux router though

[ September 25, 2002: Message edited by: Stryker ]


ims27_8

  • Member
  • **
  • Posts: 45
  • Kudos: 0
RH 7.3 internet connection sharing
« Reply #2 on: 25 September 2002, 13:12 »
thanks for the help, though it's not working, i must have done something wrong. A couple of questions:
do i use eth1 instead of ppp0 (my cable modem is connected to eth1, eth0 connects to the network, and in the line
-A forward -i ppp0 -s <ipaddress>/<netmask> -j MASQ
i use the ipaddress and netmask of eth1? if that's right, then i'm pretty sure i did everything right, but i'll double check. Thanks again for the help.

sporkme

  • Member
  • **
  • Posts: 501
  • Kudos: 149
    • http://sporkme.net/
RH 7.3 internet connection sharing
« Reply #3 on: 25 September 2002, 14:04 »
...a router
just that you do not take an interest in politics does not mean that politics will not take an interest in you.  -pericles 430 b.c.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
RH 7.3 internet connection sharing
« Reply #5 on: 25 September 2002, 19:33 »
I think he is using IP Tables and wants NAT. That HOWTO is ipchains and masquerading, is it not?

You could always try a proxy server.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Stryker

  • VIP
  • Member
  • ***
  • Posts: 1,258
  • Kudos: 41
RH 7.3 internet connection sharing
« Reply #6 on: 25 September 2002, 20:15 »
the ip and netmask would be for the eth0, the ppp0 should be changed to eth1. if that doesn't work you may have a badly configured firewall and i can't help you there. You'll also need to make sure that all the interfaces are up, use ping to check. You'll also need ipchains to start on boot, but make sure it is set up correctly as you could block the forwarding before you accept it.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
RH 7.3 internet connection sharing
« Reply #7 on: 25 September 2002, 21:22 »
quote:
Originally posted by The Master of Reality / Bob:
I think he is using IP Tables and wants NAT. That HOWTO is ipchains and masquerading, is it not?

You could always try a proxy server.



IP Masquerading is a form of NAT and it is what you and I are doing on our home networks which allows all of our machines on our private network to access the internet as if they were directly connected.
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
RH 7.3 internet connection sharing
« Reply #8 on: 25 September 2002, 21:50 »
isnt that HOWTO using ipchains though? RH 7.* uses tables. Unless he wants to unload iptables and install ipchains.
No it doesnt.....http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/kernel-2.4.x-requirements.html
i was mistaken.... i just remember using that howto for my ipchain setup. very well. Alls good

[ September 25, 2002: Message edited by: The Master of Reality / Bob ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'