LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-27-2002, 02:57 PM   #1
Sigmund Gudvang
LQ Newbie
 
Registered: Apr 2002
Posts: 14

Rep: Reputation: 0
Red Hat Firewall


I am attempting to set up a Linux (Red Hat 7.2) firewall. I have installed two network cards and verified that they are booth working (booth the internal and the external (a ADSL router (a Cisco 677i-DIR)) networks responds to ping from the Linux firewall machine). However, I get no response when I ping the ADSL router from a machine on the inside network. Booth the internal and the external (10.0.0.2) firewall IP-addresses reply when pinged from the same inside machine, so it appears that the "firewall.conf" file is allowing traffic through.

I suspect that the fault might lie with the config file for the firewall outside network card ("/etc/sysconfig/network-scripts/ifconfig-eth0"), as my ADSL router has a built-in DHCP server. The DHCP server is 10.0.0.1 and it allocates 10.0.0.2 to the firewall. I have tried booth static configuration:

DEVICE=eth0
BOOTPROTO=static
BROADCAST=10.0.0.255
IPADDR=10.0.0.2
NETMASK=255.255.255.0
NETWORK=10.0.0.0
GATEWAY=10.0.0.1
ONBOOT=yes

and dynamic configuration:

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

but booth give the same result: no response when I ping the ADSL router (10.0.0.1) from a machine on the inside. The firewall outside addr. 10.0.0.2, however, responds.

What am I overlooking?

Thanks in advance.
 
Old 04-29-2002, 03:55 AM   #2
bbenz3
Member
 
Registered: Feb 2002
Location: Orlando
Distribution: Whatever I feel like at the time I install.
Posts: 284

Rep: Reputation: 30
10.0.0.x is a set of unaddressable IPs. This means you can't ping them from any computer that is located behind the firewall. You need to try to ping the adsl modem with the router box. If that works then ping another address like the IP for this site or any other IP for any webpage. If that works then try to ping that same IP from a computer behind the firewall.

Please post your firewall script.
 
Old 04-29-2002, 05:48 PM   #3
Sigmund Gudvang
LQ Newbie
 
Registered: Apr 2002
Posts: 14

Original Poster
Rep: Reputation: 0
Red Hat Firewall

The iptables scripts is as follows:


# ****************** IPtables initial configuration file ******************
# Extern network card: eth0: 10.0.0.1
# Intern network card: eth1: 192.168.2.1

# Flush all chains
iptables -F FORWARD
iptables -F INPUT
iptables -F OUTPUT
iptables -t nat -F POSTROUTING

# Set default policy of forward, input and output chain to DROP
# (reject everything)
iptables -P FORWARD DROP
iptables -P INPUT DROP
iptables -P OUTPUT DROP

# Allow ftp, mail, HTTP, pop and SSL/TLS
iptables -A FORWARD -p tcp -d 192.168.2.0/24 -m multiport \
--sport 21,25,80,110,443 -m state --state ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp -s 192.168.2.0/24 -m multiport \
--dport 21,25,80,110,443 -m state --state NEW,ESTABLISHED -j ACCEPT

# DNS
iptables -A FORWARD -p udp -d 192.168.2.0/24 --sport 53 -j ACCEPT
iptables -A FORWARD -p udp -s 192.168.2.0/24 --dport 53 -j ACCEPT

# Allow active FTP
iptables -A FORWARD -p tcp -d 192.168.2.0/24 --sport 20 -m state \
--state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp -s 192.168.2.0/24 --dport 20 -m state \
--state ESTABLISHED -j ACCEPT

# Allow passive FTP
iptables -A FORWARD -p tcp -s 192.168.2.0/24 -m state \
--state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp -d 192.168.2.0/24 -m state \
--state ESTABLISHED -j ACCEPT

# Allow inside users to ping out but not vica versa
iptables -A FORWARD -p ICMP -d 192.168.2.0/24 \
--icmp-type echo-request -j DROP
iptables -A FORWARD -p ICMP -s 192.168.2.0/24 \
--icmp-type echo-reply -j DROP

# Allow all other ICMP packets
iptables -A FORWARD -p ICMP -j ACCEPT

# Set up NAT
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 10.0.0.1

Last edited by Sigmund Gudvang; 05-05-2002 at 06:30 AM.
 
  


Reply



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
Red Hat 9.0 Firewall Configuration DrLazardo Linux - Networking 5 05-24-2003 01:21 AM
Need some Help with the firewall in Red Hat 8 ZFighteR Linux - Networking 7 03-31-2003 06:50 PM
Red Hat 8 and Firewall...... cnc76 Linux - Distributions 1 01-24-2003 04:12 PM
Red Hat 8 and Firewall...... cnc76 Linux - Networking 1 01-24-2003 11:07 AM
Red Hat 7.3 firewall settings? safra Linux - Newbie 10 11-08-2002 09:43 AM

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

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