Skip to contentSkip to conversation

help with routing/firewall

DISCUSSION Fred Gurn 6 participants 7 messages Dec 18, 2003

lore
Share & tools
lore

Fred Gurn

author
#0 lore raw

Hi,
I have set up suse linux as bridge/firewall.
Simple configuration.
eth0 internet
eth1 local net
Everything accepted from eth1, nothing from eth0, traffic from eth1 is routed to internet.
IP forwarding is enabled.
From local net I can ping eth1 and eth0 (that means machine is routing packets), but I cant go outside eth0. Same happens when ther is no firewall. What's the problem with routing? What comands can I use to monitor what is happening with packets?

Tahnks in advance.

---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

#1 lore raw

Mmm im not sure if we are able to help you that way. that would be making the job for you I guess. correct me if I'm wrong. Read some manuals, get a grip in netfilter and if you don't understand something, we'll help you.

Juan

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Fred Gurn
Sent: jueves, 18 de diciembre de 2003 14:01
To: [email protected]
Subject: help with routing/firewall

Hi,
I have set up suse linux as bridge/firewall.
Simple configuration.
eth0 internet
eth1 local net
Everything accepted from eth1, nothing from eth0, traffic from eth1 is routed to internet.
IP forwarding is enabled.
From local net I can ping eth1 and eth0 (that means machine is routing packets), but I cant go outside eth0. Same happens when ther is no firewall. What's the problem with routing?
What comands can I use to monitor what is happening with packets?

Tahnks in advance.
_____

Do you Yahoo!?
New
<http://pa.yahoo.com/*http:/us.rd.yahoo.com/evt=21260/*http:/photos.yaho
o.com> Yahoo! Photos - easier uploading and sharing

#2 lore raw

SuSE comes with a script called SuSEfirewall that automatically configures things for you. You probably don't want that if you're talking to folks on this list.

See if you have iptables or ipchains -- type iptables-save and if you get output, post it to the list and we'll see what SuSE is doing firewall wise.

----- Original Message -----
From: "Juan Hernandez" <[email protected]>
To: <[email protected]>
Sent: Thursday, December 18, 2003 1:08 PM
Subject: RE: help with routing/firewall

Quoted 36 lines

Mmm im not sure if we are able to help you that way. that would be making the job for you I guess. correct me if I'm wrong. Read some manuals, get a grip in netfilter and if you don't understand something, we'll help you.

Juan

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Fred Gurn
Sent: jueves, 18 de diciembre de 2003 14:01
To: [email protected]
Subject: help with routing/firewall

Hi,
I have set up suse linux as bridge/firewall.
Simple configuration.
eth0 internet
eth1 local net
Everything accepted from eth1, nothing from eth0, traffic from eth1 is routed to internet.
IP forwarding is enabled.

Quoted 1 line

From local net I can ping eth1 and eth0 (that means machine is routing

packets), but I cant go outside eth0. Same happens when ther is no firewall. What's the problem with routing?
What comands can I use to monitor what is happening with packets?

Tahnks in advance.
_____

Do you Yahoo!?
New
<http://pa.yahoo.com/*http:/us.rd.yahoo.com/evt=21260/*http:/photos.yaho
o.com> Yahoo! Photos - easier uploading and sharing

#3 lore raw

Ian Hunter wrote:
SuSE comes with a script called SuSEfirewall that automatically configures things for you. You probably don't want that if you're talking to folks on this list. Yeah, SuSE configures everything through a yast2 gui and the options are very limited. It may work for a simple configuration like his, but that's about it. See if you have iptables or ipchains -- type iptables-save and if you get output, post it to the list and we'll see what SuSE is doing firewall wise. SuSE 8.2 comes with iptables. But if he can't get through when the firewall is disabled...

Jeff

#4 lore raw
In reply to Ian Hunter
Quoted 6 lines · Ian Hunter;

SuSE comes with a script called SuSEfirewall that automatically configures things for you. You probably don't want that if you're talking to folks on this list.

See if you have iptables or ipchains -- type iptables-save and if you get output, post it to the list and we'll see what SuSE is doing firewall wise.

http://sourceforge.net/projects/susefaq has an unofficial manual for SuSEfirewall.

And no SuSUfirewall does not automatically configures anything especially when it is security :-)

Signature · 1 line
Togan Muftuoglu
#5 lore raw
In reply to Fred Gurn

Fred Gurn wrote:
Hi,I have set up suse linux as bridge/firewall. Simple configuration. eth0 internet eth1 local net Everything accepted from eth1, nothing from eth0, traffic from eth1 is routed to internet. IP forwarding is enabled. From local net I can ping eth1 and eth0 (that means machine is routing packets), but I cant go outside eth0. Same happens when ther is no firewall. What's the problem with routing?
You've answered your own question. You have a problem with routing. Check the default routes on your LAN and make sure they point to the firewall box.
What comands can I use to monitor what is happening with packets?
Insert LOG rules in the ruleset and then check for entries in /var/log/messages. You can use LOG just like any other target. Until you fix the routing issue you can't do much with iptables.

Jeff

#6 lore raw
In reply to Fred Gurn
Quoted 4 lines

Simple configuration.
eth0 internet
eth1 local net
Everything accepted from eth1, nothing from eth0,

Quoted 8 lines

traffic from eth1 is routed to internet.
IP forwarding is enabled.
From local net I can ping eth1 and eth0 (that means machine is routing packets), but I cant go outside eth0. Same happens when ther is no firewall. What's the problem with routing?
What comands can I use to monitor what is happening with packets?

So do your masq/snat rules look like ?

Should be something like :
(echo "0" > /proc/sys/net/ipv4/ip_forward) iptables -P FORWARD DROP
iptables -A FORWARD -i eth1 -o eth0 -s <local_net> \
-j ACCEPT

iptables -t nat -A POSTROUTING -o eth0 -s <local_net> \
    -j SNAT --to-source <inet_ip>     ** OR **

iptables -t nat -A POSTROUTING -o eth0 -s <local_net> \
-j MASQUERADE
(echo "1" > /proc/sys/net/ipv4/ip_forward)

Gr,
Rob