Shorewall is an excellent free linux firewall which provides unparalleled level of fine grained control. shorewall은 비교할 수없는 수준의 우수한 무료 좋은 나뭇결을 제공하는 리눅스 방화벽을 제어합니다. It not only acts as a firewall and Gateway, it also supports DMZ, IP Masquerading (NAT & SNAT), Proxy ARP and more. 그것의 방화벽 및 게이트웨이의 역할을뿐 아니라, 또한 비무장 지대를 지원, ip 인척 (냇 & ISA Server 2000에 SecureNAT), 프록시 arp와 더 많은합니다. In short Shorewall is your one stop solution for complex networking routing needs, flexible & controllable internet connectivity options. 요컨대 귀하의 원스톱 솔루션을 shorewall는 복잡한 네트워크 라우팅이 필요하고 유연한 및 인터넷 연결 옵션을 제어할 수있습니다.

The Shoreline Firewall is a high-level tool for configuring Netfilter. 해안 하이 - 레벨 도구를 구성하기위한 방화벽은 넷필터합니다. The firewall/gateway requirements are described in a set of configuration files. 의 방화벽 / 게이트웨이 요구 사항은 일련의 구성 파일에 설명되어있습니다. Shorewall reads those configuration files and configures Netfilter to match your requirements. 이러한 구성 파일을 읽습니다 shorewall 사용자의 요구 사항을 일치 넷필터를 구성합니다. Shorewall can be used on a dedicated firewall system, a multi-function gateway/router/server or on a standalone GNU/Linux system. 전용 방화벽에 사용할 수있습니다 shorewall 시스템, 멀티 - 기능을 게이트웨이 / 라우터 / 서버 또는 독립 실행형 gnu / 리눅스 시스템합니다. Shorewall takes advantage of Netfilter’s connection state tracking capabilities to create a stateful firewall. shorewall의 연결 상태 추적 기능의 이점을 취합니다 넷필터 상태를 만들 방화벽을합니다. In short it provides full power of iptables without the associated complexity. 요컨대 iptables 완전한 성능을 제공합니다 연관된 복잡하지 않고있습니다.

Today I will describe a rather common setup where you have two or more redundant ADSL / Cable / T1 connections which you want to use to provide reliable internet connectivity to your intranet machines. 오늘은 오히려 일반적인 설치 프로그램을 설명하는 두 개 이상의 중복이있는 adsl / 케이블 / t1 연결을 원하는 안정적인 인터넷 접속을 제공하는 데 사용하는 기계를 인트라넷을합니다. You have set aside a machine which will act as the firewall and gateway. 이 기계를 제쳐두고 설정한의 방화벽 및 게이트웨이의 역할을합니다. It will also provide transparent connectivity to you intranet machines using NAT / SNAT using the dual connections you have most likely configured earlier with load balancing & fail-over (see below). 그것은 또한 투명하게 연결성을 제공합니다 기계를 사용하여 인트라넷에 냇 / ISA Server 2000에 SecureNAT 이중 연결을 당신은 대부분의 구성을 사용하여 이전 버전과로드 밸런싱 및 실패 - 이상 (아래 참조).

Note: This is the second part of article on providing 참고 : 이것은 두 번째 부분의 기사를 제공할 load-balanced with fail-over internet connectivity using two or more DSL / Cable connections - 균형을 유지하고 부하를 사용하여 실패 - 이상 인터넷 연결을 두 개 이상의 DSL 모뎀 / 케이블 연결을 . 합니다. You can read the first part 첫 번째 부분에서 읽어보실 수있습니다 here 여기에 . 합니다.

Note: You can also use the concept from this article to configure a setup with single or more than two internet connection(s). 참고 사항 : 본 문서에서 사용할 수있습니다의 개념을 구성하는 설치 프로그램을 하나 또는 두 개 이상의 인터넷 연결을 (영어).

Shorewall is configured using several configuration files. 여러 구성 파일을 사용하여 shorewall를 구성합니다. All configuration files are in /etc/shorewall directory. 모든 구성 파일은 / 비고 / shorewall 디렉토리합니다.

Shorewall views the network as being composed of zones. shorewall 조회의 네트워크로 구성된이 영역을합니다. Shorewall recognizes the firewall system as its own zone. 자신의 영역을 인식 시스템의 방화벽 shorewall합니다. One or more interfaces can be defined as belonging to a single zone. 하나 이상의 인터페이스를 하나의 영역에 속하는로 정의할 수있습니다. However you can have multiple zones within a single interface too as well as nested and overlapped zones. 그러나 지역을 하나의 인터페이스가 여러 개있을 수있습니다 너무뿐만 아니라 영역을 중첩과 중복합니다.

In addition to the default zones I created two new zones - net & loc. 이외에 두 개의 새로운 영역의 기본 영역을 만들었습니다 - 순수한 & loc합니다. I added the following lines to zones file: 영역을 추가했는데, 다음과 같은 줄을 파일 :

net ipv4 순수한의 IPv4
loc ipv4 loc의 IPv4

The net zone represents the machines interfaces which provide internet connectivity. 그물 영역 인터넷 연결을 나타냅니다 머신 인터페이스를 제공합니다. I then define associate these zones with the interfaces in the interfaces file by adding the following lines: 그런 다음과 인터페이스가 이러한 영역을 정의 인터페이스를 연결할 파일을 추가하여 다음과 같은 라인 :

net eth1 detect 순수한 eth1 검출
net eth2 detect 순수한 eth2 검출
loc eth0 detect loc eth0 검출

The main functionality of the firewall is configured in the policy file. 방화벽이의 주요 기능을 정책 파일에서 구성합니다. Here I specify how the traffic is restricted across various zones. 여기 트래픽을 제한하는 방법을 지정 걸쳐 다양한 영역을합니다. I added the following lines in policy file: 정책을 다음과 같은 라인을 추가했는데, 파일 :

loc net ACCEPT loc 순수한 수락
net all DROP info 순수한의 모든 드롭 정보
$FW net ACCEPT $ 스트라이커 순수한 수락
$FW loc ACCEPT $ 스트라이커 loc 수락
loc $FW ACCEPT loc $ 스트라이커 수락
all all REJECT info 모두 모두 거부 정보

Explanation 설명
———— ----
loc net ACCEPT -&rt; Accept all connections from local network to internet loc 순수한 받아들일 - 인터넷 &rt; 로컬 네트워크에 연결을 모두 수락
net all DROP info -&rt; Drop all incoming connection requests from network interfaces 순수한의 모든 드롭 정보 - &rt; 드롭 연결 요청이 들어오는 모든 네트워크 인터페이스에서
$FW net ACCEPT -&rt; Accept connections from firewall to the internet interfaces $ 스트라이커 순수한 받아들일 - 방화벽을 인터넷에 연결을 허용 인터페이스를 &rt;
$FW loc ACCEPT -&rt; Accept connections from firewall to the local network. $ 스트라이커 loc 받아들일 - 방화벽을 &rt; 로컬 네트워크에 연결을 허용합니다. You may want to omit this line for added security. 이 라인을 생략 할 수있습니다 추가된 보안합니다.
loc $FW ACCEPT -&rt; Accept all connection from local network to firewall machine loc $ 스트라이커 받아들일 - &rt; 방화벽을 컴퓨터에 로컬 네트워크에 연결을 모두 수락
all all REJECT info -&rt; Reject everything else 모두 모두 거부 정보 - &rt; 거부 밖의 모든 것

To enable IP Masquerading I need to specify the interfaces between which IP Masq needs to be enabled. ip 인척을 설정하는 동안 나는 어떤 ip를 지정할 필요가 허위의 인터페이스를 활성화해야합니다. I made the following additions to masq files to accomplish this: 나는이 허위의 파일을 만들어 이것을 달성하기 위해 다음과 같은 이미지 :

eth1 172.16.0.0/24 192.168.1.10 eth1 172.16.0.0/24 192.168.1.10
eth2 172.16.0.0/24 192.168.0.10 eth2 172.16.0.0/24 192.168.0.10

The above lines instructs that IP Masquerading should be enabled from intranet to either eth1 or eth2 interfaces. 위의 라인에서 지시가 활성화되어 있어야 인트라넷을 꾸미는 ip eth1, eth2 인터페이스 중 하나를합니다.

This completes the core configuration changes. 이것의 핵심 구성 변경 사항을 완료합니다. Finally the shorewall.conf needs to be modified to enable shorewall, add the SNAT aliases and you can also do a minor optimization of the firewall while you are at it. 마지막으로 바뀌었습니다 shorewall.conf을 활성화해야합니다 shorewall를 추가합니다 별칭과 ISA Server 2000에 SecureNAT 마이너 최적화를 할 수있습니다 당신은 그것의 방화벽을하는 동안합니다. The changes to shorewall.conf are as follows: 에 변경 사항을 shorewall.conf은 다음과 같습니다 :

STARTUP_ENABLED=Yes startup_enabled = 예
ADD_SNAT_ALIASES=Yes add_snat_aliases = 예
FASTACCEPT=Yes fastaccept = 예

Now you are ready to go. 자, 이제 당신은 떠날 준비가되어있습니다. You should set shorewall to start as a service on rebooting with: 서비스로 설정해야합니다을 재부 팅을 시작으로 shorewall :
chkconfig shorewall on chkconfig에 shorewall

You can start it now with: 지금를 시작하실 수있습니다 :
service shorewall start 서비스를 시작 shorewall