Fedora Linux Support Community & Resources Center
  #1  
Old 14th February 2006, 05:36 PM
newby Offline
Registered User
 
Join Date: May 2005
Posts: 33
How to setup the PC as the Router ?

I have read many threads. And I have tried several ideas. But I must be missing some fundamental thing. Because I can't get my FC4 PC to act as the primary connection to the internet for the other devices on my small network. I'm sure I'm confused somewhere.
If anyone can point me in the right direction I'd appreciate it.

Currently I have 2 nics in the PC. The first eth0 is connected directly to the DSL modem < config DHCP>. The second eth1 is connected to a dumb hub<Linksys-not a router or switch>. I have a 2nd PC <Gentoo> that is also connected to the dumb hub. The first PC connects to the internet just fine. But I can't get the2nd PC to connect.

On the 1st PC I have the eth0 configed DHCP to get whatever address the ISP assignes. and eth1 I have setup with Ip: 192.168.0.1 Subnet 255.255.255.250 GW: 61.155.X.X < the Ip address given when i connect to the outside>.
On the 2nd PC I have the eth0 configed Ip: 192.168.0.2 Subnet: 255.255.255.250 GW: 192.168.0.1

So my questions: How should I configure the 1st PC to make it route. And what do I need to do to the second PC to point it to the router?

Thnx.
_________________
Put one foot in front of the other, and walk towards the light.
Reply With Quote
  #2  
Old 14th February 2006, 05:48 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,306
You don't just need it to route, you need it to NAT your internal network.

Setting it up from scratch is a little beyond the scope of this forum, there are plenty of good documents on the net. Google is your friend.

Firestarter can do the basic setup for you. Install it with yum then use the wizard to set up your firewall and be sure to check "Enable Internet connection sharing" on the second screen.
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #3  
Old 21st February 2006, 07:10 PM
newby Offline
Registered User
 
Join Date: May 2005
Posts: 33
I have found the following website to be very helpful:
http://www.linuxhomenetworking.com/

I also changed my who configuration. And I found the following setup to be successfull for Setting up a DHCP server and Routing functions.

/etc/conf.d/net

ddns-update-style interim;
authoritative;
ignore client-updates;

subnet 192.168.2.0 netmask 255.255.255.0 {

# The range of IP addresses the server

# will issue to DHCP enabled PC clients

# booting up on the network


range 192.168.2.2 192.168.2.20;

# Set the amount of time in seconds that

# a client may keep the IP address


default-lease-time 86400;
max-lease-time 86400;

# Set the default gateway to be used by

# the PC clients

option routers 192.168.2.1;

# Forward DHCP requests from this

# NIC interface to other NIC

# interfaces



option ip-forwarding on;



# Set the broadcast address and subnet mask

# to be used by the DHCP clients


option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;



# Set the DNS server to be used by the

# DHCP clients


# option domain-name-servers 192.168.1.100;


# Set the NTP server to be used by the

# DHCP clients


# option nntp-server 192.168.1.100;

# If you specify a WINS server for your Windows clients,

# you need to include the following option in the dhcpd.conf file:

# option netbios-name-servers 192.168.1.100;



# You can also assign specific IP addresses based on the clients'

# ethernet MAC address as follows (Host's name is "laser-printer":

host laser-printer {

# hardware ethernet 08:00:2b:4c:59:23;
# fixed-address 192.168.1.222;

}

}

#

# List an unused interface here

#
subnet 192.168.3.0 netmask 255.255.255.0 {
}


/etc/sysconfig/network-scripts/ifcfg-eth1 <Internal Network>

IPV6INIT=no
ONBOOT=yes
USERCTL=yes
PEERDNS=yes
TYPE=Ethernet
DEVICE=eth1
HWADDR=00:05:5d:46:c8:16
BOOTPROTO=static
NETMASK=255.255.255.0
IPADDR=192.168.2.1

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0 < This connects to DSL for Internet>
BOOTPROTO=dhcp
HWADDR=00:04:5A:5E:EA:2B
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no

type the following at the command line:

- ifconfig eth1 inet 192.168.2.1
- route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1 eth1
- dhcpd
- service dhcpd start

Here's a couple websites with some info on configuring a firewall using IPTables:
http://involution.com/iptables_demo/
http://www.ccl.net/cca/software/UNIX...er/index.shtml

I hope this helps people.
Reply With Quote
Reply

Tags
router, setup

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this an equivalent setup? (small router + switch, big router) joe.pelayo Servers & Networking 7 25th January 2008 05:29 AM
Router setup? Nefarious Servers & Networking 8 20th November 2006 10:49 PM
Problems with router setup jimmy20013 Servers & Networking 9 3rd August 2006 10:01 AM
"Advanced" Networking uestion... how to setup a Linksys WRT54G router BEHIND a router Thetargos Servers & Networking 16 15th June 2006 08:50 AM
DSL router setup with 2 NICS soongwoo Servers & Networking 3 4th September 2005 03:29 AM


Current GMT-time: 05:56 (Saturday, 20-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat