LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-02-2005, 04:41 PM   #1
da644
LQ Newbie
 
Registered: Apr 2005
Posts: 2

Rep: Reputation: 0
Setting up firewall / nat server


Hi All.

We have a small business network and have a Cisco ADSL Router and I would like to set up a firewall using FC4 between that and the rest of the network. What do I need to do to get it to act as nat server?

The server has two network cards, eth0 connected to the router and eth1 connected to the network switch. The configuration is as follows:

Cisco Router <--> [eth0] FC4 server [eth1] <--> LAN Network

Thanks

Andrew.
 
Old 08-02-2005, 08:22 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
This should get you started;
http://tldp.org/HOWTO/Masquerading-Simple-HOWTO/
Here is mine, like yours eth0=WAN eth1=LAN
Code:
# iptables -F; iptables -t nat -F; iptables -t mangle -F
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
# iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# iptables -A INPUT -m state --state NEW -i ! eth0 -j ACCEPT
# iptables -A INPUT -p icmp -j ACCEPT
# iptables -P INPUT DROP
and to enable stuff;
Code:
# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
or this may be for fedora not sure;
# echo 1 > /proc/sys/net/ipv4/ip_forward

Last edited by comprookie2000; 08-02-2005 at 08:25 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setting up a linux server + firewall + nat ddaas Linux - Security 7 10-14-2004 06:42 PM
setting up firewall/nat goldenbrodie Linux - Networking 2 02-25-2004 08:31 AM
Setting up NAT/DHCP/Router/Firewall on Red Hat wingphil Red Hat 1 01-29-2004 07:34 AM
gateway(NAT),firewall,server,DMZ andjules Linux - Networking 1 11-22-2002 05:55 PM
gateway(NAT),firewall,server,DMZ andjules Linux - Newbie 2 11-22-2002 08:11 AM

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

All times are GMT -5. The time now is 02:29 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