How to configure a gateway firewall using iptables in Centos 6.3

Source: Internet
Author: User
Tags centos iptables firewall

System environment: centos6.3 x64

IPTABLES: System with Self

I. Deployment environment:

1. Close SELinux

# Setenforce 0

# Vi/etc/sysconfig/selinux

---------------

Selinux=disabled

---------------

2. Empty the default policy and restart Iptables

# iptables-t Nat-f

# iptables-f

# Service Iptables Save

# Service Iptables Restart

3. Turn on server-side routing forwarding function

# vi/etc/sysctl.conf

---------------------

Net.ipv4.ip_forward = 1

---------------------

# sysctl-p

In this example we simulate a Web site, only open the ssh:22 and web:80 ports at the firewall, and configure the firewall to the intranet server 22 and 80 port mapping, if you open other port services, please modify

Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Network/Firewall/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.