How to make Fedora core 4 machine work as a router with 2 LAN cards?

Posted on 2006-05-02
Last Modified: 2012-08-13
I've Fedora core 4 installed on my desktop pc at home with 2 Lan cards. I've 2 windows machine too at home and am using Cable Internet connection.
I want to setup the Linux box to work as a router. Tried connecting one NIC configured with DHCP and connected to Cable modem.
Other NIC is assigned and connected to hub. Windows machines are assigned and 1.3.
And one of the NICs is becomes inactive automatically always.

I did tried setting ip_forward=yes in iptables and later also tried disabling the firewall too but the fedora box did not work as router.

Question by:lagooy

    Expert Comment

    The following commands should do the trick for you, assuming that eth0 is connected to your cable modem.

    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

    The MASQUERADE target in iptables is prefered if you have a dynamic IP setup, if you had had a static
    IP it is prefered to use the SNAT target (read the manual page for iptables for a more through story
    of what they both do).

    More information in the NAT HOWTO:
    LVL 17

    Expert Comment

    Following link will gives the answer.

    BR Dushan
    LVL 1

    Accepted Solution

    You might try downloading and installing Webmin ( Turn the firewall off and then configure it using webmin (Networking --> Linux Firewall). When you do inital firewall setup with Webmin it will ask you what kind of firewall you want to setup, choose "Do network address translation on external interface: <choose the network card that is connected to the public IP address here>. Once setup it will configure a somewhat secure firewall. Open any additonal ports you may need (including 10000:tcp for Webmin).

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now