Jump to content
Compatible Support Forums
Sign in to follow this  
palmliu

Who can teach me about ipchains?

Recommended Posts

I will be delete my redhat8.0 if I can't make my firewall?

If I want input and output from 8000,I should do what?

Can you tell me these are right or wrong?

"vi /ect/sysconfig/ipchains"

then

"-A input -s 0/0 8000 -d 0/0 -p udp -j ACCEPT"

but I don't know how to save?I don't know.

then

"etc/rc.d/init.d/ipchains restart"

 

If one of you know these are right or wrong or how to make it,can you put a Email to chun19831114@yahoo.com.cn

Share this post


Link to post

ipchains has been replaced by iptables. I personally do not know enough about firewalling to help you, but the overwhelmingly popular firewall script found at: http://monmotha.mplug.org/firewall/index.php can pobably be adjusted to suit your needs. At worst, you could lok it over for ideas that could help you find a solution. HTH!

Share this post


Link to post

IPTABLES... much more flexible, easier to understand and we can see a good script:

 

A link to a script that should be understandable...

 

Now you can see from that, you can modify it to your hearts content.

 

That is a REALLY good script has worked for hundreds of people. Just read it. Save the text of the "monospace" font to a file called homeipt.sh, make it executable (chmod +x homeipt.sh)

 

First do a

Code:
service ipchains stop

 

Then a

Code:
modprobe -r ipchains

 

then run script... I called it "homeipt.sh" and put it into /etc/rc.d/

 

using

Code:
pico /etc/rc.d/rc.local
and add
Code:
/etc/rc.d/homeipt.sh
at the bottom of that.

 

once you do that, do a

Code:
service iptables save

 

It'll save the default config.... and keep them so the firewall is up before the networking, then at the end of init... it'll run and get the routing setup properly too...

 

Check it out... it is commented, modify to do you well...

 

Now to PORT re-direction of a specific port to the same port on a private IP addr... well that is beyond that script.

 

Restart your machine and it should be good.

 

If you want a script generated for you. look no further... This is your answer!

 

Just follow the instructions.

Share this post


Link to post
Quote:
I will be delete my redhat8.0 if I can't make my firewall?
If I want input and output from 8000,I should do what?
Can you tell me these are right or wrong?
"vi /ect/sysconfig/ipchains"
then
"-A input -s 0/0 8000 -d 0/0 -p udp -j ACCEPT"
but I don't know how to save?I don't know.
then
"etc/rc.d/init.d/ipchains restart"

If one of you know these are right or wrong or how to make it,can you put a Email to chun19831114@yahoo.com.cn


you do this:

ipchains -A input -s 0/0 -p all --dport 8000 -j ACCEPT
ipchains -A output -s {ip of your host} -p all --sport 8000 -j ACCEPT

what this means:

-in the input chain -s = the source is the outside host and destination port is your localhosts port 8000
-in the output chain -s = the source is your localhost particulary your localhost's port 8000
you save your ipchains rules by doing:

ipchains-save

you can restore your saved ipchains rules (.txt) by doing:

ipchains-restore /the/file

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×