# 4.5. Set up iptables

Set up for packet filtering.

At the initial condition, the access to the web server is controlled. The following shows how to set up for access permission.

| **\[root\@xoonips-server \~]# vi /etc/sysconfig/iptables**                         |                                          |
| ---------------------------------------------------------------------------------- | ---------------------------------------- |
| Copy the line below.                                                               |                                          |
| **-A RH-Firewall-l-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT** |                                          |
| ↓ Change the "22" in the line to "80".                                             |                                          |
| **-A RH-Firewall-l-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT** |                                          |
| **\[root\@xoonips-server \~]# /etc/init.d/iptables restart**                       | ← Restart the packet filtering software. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xoops.gitbook.io/xoonips-tutorial/3installation/4.-customize-centos5/45set_up_iptables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
