This is my basic template for firewall on an ubuntu machine, I think this works on fedora as well
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
I save it on a file in /etc/init.d/ and make a symlink to /etc/rc2.d, change mode to +x. You can also opt to DROP all packets forwarded to eth1 and open selected ports only.
For DHCP, the following is a basic template, add it inside your dhcpd.conf
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.30 192.168.0.250;
option routers 192.168.0.10;
option broadcast-address 192.168.0.255;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.0.10;
}
host YourServer {
hardware ethernet <your-internal-nic-MAC-address>;
fixed-address 192.168.0.10;
}
As for DNS, insert your service provider's DNS IPs on /etc/resolv.conf and in /etc/bind/named.conf.options. You can also use Google's public DNS IPs or OpenDNS.
EDIT
The following should be on your /etc/network/interfaces
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.0.10
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
Since your eth0 is on DHCP and I assume is connected to your modem (internet interface), it will request for the IP and Gateway addresses from the modem. The eth1 will be your internal-network interface and is on static IP.