From 6cba78e89a3a8f49fea8021d1a89e79642f44e0e Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 19 Feb 2016 09:02:44 -0800 Subject: [PATCH] Update Aliased Interface article for 5.0 Signed-off-by: Tom Eastep --- docs/Shorewall_and_Aliased_Interfaces.xml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/Shorewall_and_Aliased_Interfaces.xml b/docs/Shorewall_and_Aliased_Interfaces.xml index 432fbb9f1..92acab9bb 100644 --- a/docs/Shorewall_and_Aliased_Interfaces.xml +++ b/docs/Shorewall_and_Aliased_Interfaces.xml @@ -179,15 +179,14 @@ ACCEPT net $FW:206.124.146.178 tcp 22 zone at 192.168.1.3. That is accomplished by a single rule in the /etc/shorewall/rules file: - #ACTION SOURCE DEST PROTO DEST PORT(S) SOURCE ORIGINAL -# PORT(S) DEST + #ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST DNAT net loc:192.168.1.3 tcp 80 - 206.124.146.178 If I wished to forward tcp port 10000 on that virtual interface to port 22 on local host 192.168.1.3, the rule would be: - #ACTION SOURCE DEST PROTO DEST PORT(S) SOURCE ORIGINAL -# PORT(S) DEST + #ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST +DNAT net loc:192.168.1.3 tcp 80 - 206.124.146.178 DNAT net loc:192.168.1.3:22 tcp 10000 - 206.124.146.178 @@ -202,7 +201,7 @@ DNAT net loc:192.168.1.3:22 tcp 10000 - 20 eth0 192.168.1.0/24 206.124.146.178 Similarly, you want SMTP traffic from local system 192.168.1.22 to - have source IP 206.124.146.178:#INTERFACE SUBNET ADDRESS PROTO DEST PORT(S) + have source IP 206.124.146.178:#INTERFACE SUBNET ADDRESS PROTO DPORT eth0 192.168.1.22 206.124.146.178 tcp 25 Shorewall can create the alias (additional address) for you if you @@ -246,7 +245,7 @@ eth0:2 = 206.124.146.180 would have the following in /etc/shorewall/nat: - #EXTERNAL INTERFACE INTERNAL ALL INTERFACES LOCAL + #EXTERNAL INTERFACE INTERNAL ALL_INTERFACES LOCAL 206.124.146.178 eth0 192.168.1.3 no no Shorewall can create the alias (additional address) for you if you @@ -263,7 +262,7 @@ eth0:2 = 206.124.146.180 setting ADD_IP_ALIASES=Yes, you specify the virtual interface name in the INTERFACE column as follows. - /etc/shorewall/nat#EXTERNAL INTERFACE INTERNAL ALL INTERFACES LOCAL + /etc/shorewall/nat#EXTERNAL INTERFACE INTERNAL ALL_INTERFACES LOCAL 206.124.146.178 eth0:0 192.168.1.3 no no In either case, to create rules in @@ -275,7 +274,7 @@ eth0:2 = 206.124.146.180 You want to allow SSH from the net to 206.124.146.178 a.k.a. 192.168.1.3. - #ACTION SOURCE DEST PROTO DEST PORT(S) + #ACTION SOURCE DEST PROTO DPORT ACCEPT net loc:192.168.1.3 tcp 22 @@ -305,8 +304,8 @@ loc ipv4 In /etc/shorewall/interfaces: - #ZONE INTERFACE BROADCAST OPTIONS -loc eth1 - routeback + #ZONE INTERFACE OPTIONS +loc eth1 routeback In /etc/shorewall/rules, simply specify ACCEPT rules for the traffic that you want to permit. @@ -327,8 +326,8 @@ loc2 ipv4 In /etc/shorewall/interfaces: - #ZONE INTERFACE BROADCAST OPTIONS -- eth1 - + #ZONE INTERFACE OPTIONS +- eth1 In /etc/shorewall/hosts: