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 10-12-2002, 12:10 PM   #1
whaase
Member
 
Registered: Aug 2002
Location: Calgary, Alberta, Canada
Distribution: Ubuntu Server, Ubuntu Desktop
Posts: 128

Rep: Reputation: 15
Will this work?


Can someone tell me if this will work. I want to share my internet connection from my linux box and this how I was going to do

it.

ifcfg-eth0:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp


ifcfg-eth1:

DEVICE=eth1
IPADDR=192.168.0.1
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none

/etc/sysconfig/network file:

NETWORKING=yes
FORWARD_IPV4=yes
GATEWAYDEV=eth0

and last enter the following commands:

/sbin/ipchains -P forward DENY
/sbin/ipchains -s 192.168.0.1/24 -j MASQ

Will all this work? I'm using RH7.3

Thanks, Walter.
 
Old 10-12-2002, 04:36 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
For me it looks correct.
 
Old 10-13-2002, 09:59 AM   #3
whaase
Member
 
Registered: Aug 2002
Location: Calgary, Alberta, Canada
Distribution: Ubuntu Server, Ubuntu Desktop
Posts: 128

Original Poster
Rep: Reputation: 15
Ok, now lets say I have to use the iptables command. What would I type instead of the ipchains I just gave?


Walter.
 
Old 10-13-2002, 10:39 AM   #4
turnip
Member
 
Registered: Jul 2002
Posts: 143

Rep: Reputation: 15
iptables -P FORWARD DENY
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -J MASQUERADE
 
  


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
Does the mounting of a *BSD partition on linux work work well when rw ? kloss *BSD 3 10-08-2005 02:21 PM
Will Ubuntu Work work With my Wireless Card? PulsarSL Ubuntu 3 10-07-2005 10:33 PM
got ALSA to work in root, need help getting it to work in my user profile ic3 Slackware 2 11-28-2003 10:32 PM
FALCONS EYE (nethack) FAILS ON STARTUP, use to work, wont work even after reinstall roorings Linux - Software 0 10-08-2003 10:39 PM
UPS cable didn't work. A cool work-around jlangelier LinuxQuestions.org Member Success Stories 1 07-18-2003 05:04 PM

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

All times are GMT -5. The time now is 12:20 AM.

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