Who can teach me about ipchains?

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.

Linux Networking 361 This topic was started by ,


data/avatar/default/avatar17.webp

1 Posts
Location -
Joined 2003-02-19
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

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar15.webp

37 Posts
Location -
Joined 2003-02-16
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!

data/avatar/default/avatar38.webp

64 Posts
Location -
Joined 2003-01-03
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.

data/avatar/default/avatar10.webp

5 Posts
Location -
Joined 2003-08-01
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