LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-28-2005, 07:00 AM   #1
sys7em
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Slackware
Posts: 158

Rep: Reputation: 30
Help me upgrade my firewall ....


I have made a simple firewall script ... it's very basic but it's working .. I have tried some others .. but I'm doing somethin' wrong ... and I'm goin' back to my script ...

Here it is :

Code:
#!/bin/sh

INTERNET="eth1"
LAN="eth0"

iptables -A INPUT -j ACCEPT
iptables -A OUTPUT -j ACCEPT
iptables -A FORWARD -j ACCEPT

iptables -t nat -A POSTROUTING -j MASQUERADE -o $INTERNET -s 192.168.0.2 -d 0/0
iptables -t nat -A POSTROUTING -j MASQUERADE -o $INTERNET -s 192.168.0.3 -d 0/0
iptables -t nat -A POSTROUTING -j MASQUERADE -o $INTERNET -s 192.168.0.100 -d 0/0
iptables -t nat -A POSTROUTING -j MASQUERADE -o $INTERNET -s 192.168.0.101 -d 0/0

iptables -A FORWARD -d 192.168.0.0/255.255.255.0 -j ACCEPT
iptables -A FORWARD -s 192.168.0.2 -j ACCEPT
iptables -A FORWARD -s 192.168.0.3 -j ACCEPT
iptables -A FORWARD -s 192.168.0.100 -j ACCEPT
iptables -A FORWARD -s 192.168.0.101 -j ACCEPT
It's gettin' internet from eth1 and it's sharing it to 4 computers on my local network . The server is Slackware. Kernel 2.4.26. I think it's time to upgrade my firewall. I want also to drop some packets and denie some ports. Cause the network is gettin' bigger. But my knowledge is very poor and every time I brake somethin' . My question is is the script above right ... and what should I upgrade ... Thank you in advance

Regards: Alex
 
Old 04-28-2005, 07:17 AM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
here is a tool for generating a firewall script:
http://easyfwgen.morizot.net/gen/index.php
 
  


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
BSD Firewall vs Linux Firewall ? rootlinux Linux - Security 5 08-29-2007 07:38 AM
Firewall with features of a Sidewinder firewall? abcampa Linux - Security 4 04-22-2005 04:24 PM
upgrade RH8 to RH9 - upgrade or clean install PAB Linux - General 0 03-13-2004 03:55 PM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 09:15 PM
Firewall Builder sample firewall policy file ? (.xml) nuwanguy Linux - Networking 0 09-13-2003 12:32 PM

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

All times are GMT -5. The time now is 07:03 PM.

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