PDA

View Full Version : How to configure FC5 as an internet router


hussram
2007-03-02, 01:59 PM CST
I would like to configure my FC5 as the gate way (router) to the internet for the other PCs running WinXP at home. My PC is currently performing that task while it's running WinXP. I'm confused between Samba & Apache, which one enables FC5 to do that task?

Many thanks.

markkuk
2007-03-02, 02:28 PM CST
You don't use either Samba or Apache, you use iptables (http://www.netfilter.org/) to share your Internet connection. Install fwbuilder, firestarter or shorewall from Fedora Extras to set up your iptables rules.

Brian1
2007-03-02, 05:11 PM CST
Might use the search tool many post on the subject. Here is one that I tell all. Check #3 on it.
http://www.fedoraforum.org/forum/showthread.php?t=148344&highlight=router

Brian

hussram
2007-05-01, 02:55 PM CDT
Thank you for your replies. I know it's been a while since I posted this query about making my FC5 as the gateway for the other PCs but I could not get to it earlier.

I have a USB modem for the Internet on the FC5 PC and an ethernet card for the internal network with two PCs running WinXP & Linux. I installed the iptables and created the firewall rules for FC5 but I still can not have the other PCs (WinXp & Linux) connected to the internet. The FC5 doe not supply the IP to the other PCs since they're DHCP enabled. I even tried setting the IP address manuall on thos two PCs (instead of DHCP) and that did not help.

I enabled IPv6 as well as IP forwarding and that did not help.

Through some search it was indicated that the kernel package provides the dhcp addressing to the other client PCs. Do I need DHCP config setup on the FC5 in order to provide the IP to the other PCs.

The output of ifconfig:
eth0 Link encap:Ethernet HWaddr 00:08:02:40:07:59
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::208:2ff:fe40:759/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:841 errors:0 dropped:0 overruns:0 frame:0
TX packets:676 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:179554 (175.3 KiB) TX bytes:138655 (135.4 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2255 errors:0 dropped:0 overruns:0 frame:0
TX packets:2255 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3364494 (3.2 MiB) TX bytes:3364494 (3.2 MiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:86.97.89.249 P-t-P:213.42.8.55 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:9178 Metric:1
RX packets:1689 errors:0 dropped:0 overruns:0 frame:0
TX packets:1897 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:955109 (932.7 KiB) TX bytes:329698 (321.9 KiB)

The file /etc/dhclient-eth0.conf contains only the following line:
send host-name "myfc5"; # temporary RHL ifup addition

And I do not have the file /etc/dhclient.conf.

The file /etc/sysconfig/network-scripts/ifcfg-eth0 has the following:
DEVICE=eth0
IPADDR=192.168.0.1
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
USERCTL=no
IPV6INIT=yes
PEERDNS=yes
TYPE=Ethernet

Thank you in advance for any helping thoughts.

marcrblevins
2007-05-01, 08:58 PM CDT
http://www.faqs.org/docs/securing/index.html

Of course, it uses ipchains instead of iptables, would be nice someone revamp it.

markkuk
2007-05-01, 11:34 PM CDT
Through some search it was indicated that the kernel package provides the dhcp addressing to the other client PCs. Do I need DHCP config setup on the FC5 in order to provide the IP to the other PCs.

No, the kernel has nothing to do with DHCP. You must install and configure a DHCP server on your machine. Use either the ISC DHCP server (http://www.isc.org/sw/dhcp/dhcp_rel.php) (package dhcp in Fedora Core) or dnsmasq (http://www.thekelleys.org.uk/dnsmasq/doc.html) (in Fedora Extras).
I think dnsmasq is better for home networks.

nothing
2007-05-02, 11:59 AM CDT
am looking too to build a gateway wiht FC5, am actually use smoothwall but i dont like it ( i like much more pf Sense but cant install it on hd due to an bug wiht some HD geometry) i would like to know witch service i need to run to make my FC5 act as router. and i need a nice web interface to configure it.

i need
DHCP service
VPN client/server
firewall service
ssh server
apache and php (if there is some kind of web gui i can use to configure my thing)

i dont know if i forget somting...

i would like to know how to bridge my GREEN and RED NIC


thx

hussram
2007-05-02, 12:09 PM CDT
Thank you again for your replies. I installed dnsmasq on my FC5 and that fixed the problem. My other PC (linux) & Laptop (WinXP) are now happy by getting their addresses assigned by DHCP and then accessing the internet. I greatly appreciate your feedback.

rbo83
2007-05-02, 01:06 PM CDT
Does any one know if this can be set-up for a wireless router ? i.e. the fedora router box would be connected to a linksys wireless router on one wireless ethernet port (the internet access port), and the other ethernet port would be connected to a downstream router connecting several wired PC's ?