Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bridged firewll
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kevmarks
n00b
n00b


Joined: 26 Oct 2002
Posts: 16

PostPosted: Fri Nov 08, 2002 3:50 am    Post subject: bridged firewll Reply with quote

ok, I have downloaded gentoo and set it up on and old HP Netserver LD server. 2 NIC's are installed and one is connected to my DSL modem (earthlink) the other is connected to my linksys switch (i.e internal network).

I have recompiled my kernel to include all the extra netfilter code I need. rp-ppoe is installed and working fine. I can ping this mahine from a workstation and the server can ping the outside world.

At this point I am not interested in getting the firewall to work, I just want the thing to msquerade my internal network to the internet. I have tried the following

iptables -append forward --in-interface eth0 -j accept
iptables --table nat --append postrouting --out-interface ppp0 -j masquerade

but no luck. I set the server as the default route on all the workstations, but I just can't ping the ppp0 interface. Do I have to install some kind of third party bridging software to get linux to bridge properly? Has anybody actually managed to do this with gentoo?
Back to top
View user's profile Send private message
securiteaze
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2002
Posts: 77
Location: Tulsa,Oklahoma

PostPosted: Fri Nov 08, 2002 7:32 am    Post subject: Reply with quote

I don't think you want a bridge, unless you have public IPs on your internal network.
You described a masquerading router. There is no need for third party software to perform those functions.
Have you read the Documentation? :wink:
_________________
Blah..
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Fri Nov 08, 2002 7:54 am    Post subject: Reply with quote

This is a 2 liner:

echo "1" > /proc/sys/net/ipv4/ip_forward

That turns it on in the kernel. Next step:

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

I think that should do it for ya, but I would recommend this instead:

http://projectfiles.com/firewall

Just download that sucker, chmod it to 755, edit it to open the ports you want open to the outside world, and run it.
Back to top
View user's profile Send private message
noise
n00b
n00b


Joined: 07 Nov 2002
Posts: 35

PostPosted: Fri Nov 08, 2002 9:56 am    Post subject: Reply with quote

i have a lill quetsion...

rc.firewall that splooge is talking about...

1. if i use the script, do i still have to make rules for iptables?
2. how do i make the script start on boot? put it in the local.start (just the /path/filename)??
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Fri Nov 08, 2002 5:50 pm    Post subject: Reply with quote

1) No, the script does everything, except for compile the right modules into your kernel.

2) You can put it in your local.start, but it's made to also be able to run as an init script at boot time. I simply copied it over my current iptables file in /etc/init.d then did a rc-update add iptables default.
Back to top
View user's profile Send private message
kevmarks
n00b
n00b


Joined: 26 Oct 2002
Posts: 16

PostPosted: Fri Nov 08, 2002 8:45 pm    Post subject: Reply with quote

ah echo "1" > /proc/etc..

I have been doing echo 1 > /proc/etc..

could it be the little speach marks making the difference? I will try it tonight
Back to top
View user's profile Send private message
kevmarks
n00b
n00b


Joined: 26 Oct 2002
Posts: 16

PostPosted: Mon Nov 11, 2002 3:59 am    Post subject: Reply with quote

yup, that was it. Just needed the little speach marks. I can now ping the ppp0 interface. But can't get out to the internet from the workstations. Ah well, good job I don't have a deadline for this server :D
Back to top
View user's profile Send private message
mglauche
Retired Dev
Retired Dev


Joined: 25 Apr 2002
Posts: 564
Location: Germany

PostPosted: Mon Nov 11, 2002 4:38 pm    Post subject: Reply with quote

back to that bridged firewall topic :P anyone did try one yet ? I imagine you need something like 3 nic's 2 for the bridge, and 1 for access .. filtering without beeing seen seems not so bad for me ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum