Hi All:
I try to setup a network environment as follwing topology.
http://picasaweb.google.com.tw/ziway.net/ImageHosting#5480213481267166610
My purpose:
1. Let specific users are in the private network can access internet via NAT.
2. Let users can remote control specific PCs in the private network from internet through MS Remote Desktop.
pf.conf:
Routing table:
ifconfig:
Now the first propose is ok, but the second is not.
Would you please help me to check the pf.conf?
I try to setup a network environment as follwing topology.
http://picasaweb.google.com.tw/ziway.net/ImageHosting#5480213481267166610
My purpose:
1. Let specific users are in the private network can access internet via NAT.
2. Let users can remote control specific PCs in the private network from internet through MS Remote Desktop.
pf.conf:
Code:
LAB_IF="age0"
MOD_IF="tun0"
table <Brian> persist file "/etc/pf/Brian"
table <Fred> persist file "/etc/pf/Fred"
table <Iris> persist file "/etc/pf/Iris"
table <Jack> persist file "/etc/pf/Jack"
table <Joe> persist file "/etc/pf/Joe"
table <Juice> persist file "/etc/pf/Juice"
table <Rick> persist file "/etc/pf/Rick"
table <Zhiyu> persist file "/etc/pf/Zhiyu"
table <TestBed2-3> persist file "/etc/pf/TestBed2-3"
set skip on lo
scrub in all
rdr pass on $MOD_IF proto tcp from any to any port 43021 -> 10.100.43.21 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43022 -> 10.100.43.22 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43023 -> 10.100.43.23 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43024 -> 10.100.43.24 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43025 -> 10.100.43.25 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43026 -> 10.100.43.26 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43027 -> 10.100.43.27 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43028 -> 10.100.43.28 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43029 -> 10.100.43.29 port 3389
rdr pass on $MOD_IF proto tcp from any to any port 43030 -> 10.100.43.30 port 3389
nat on $MOD_IF from 10.100.43.0/24 to any -> $MOD_IF
nat on $MOD_IF from 10.100.41.0/24 to any -> $MOD_IF
antispoof log for $LAB_IF inet
block in log on $LAB_IF all
pass in log quick on $LAB_IF from <Brian> to any keep state
pass in log quick on $LAB_IF from <Fred> to any keep state
pass in log quick on $LAB_IF from <Iris> to any keep state
pass in log quick on $LAB_IF from <Jack> to any keep state
pass in log quick on $LAB_IF from <Joe> to any keep state
pass in log quick on $LAB_IF from <Rick> to any keep state
pass in log quick on $LAB_IF from <Zhiyu> to any keep state
pass in log quick on $LAB_IF from <TestBed2-3> to any keep state
pass in log quick on $LAB_IF from <Juice> to any keep state
Routing table:
Code:
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 168.95.98.254 UGS 0 131225 tun0
10.100.41.0/24 link#1 U 0 12189 age0
10.100.41.59 link#1 UHS 0 0 lo0
10.100.43.0/24 link#1 U 1 57252 age0
10.100.43.136 link#1 UHS 0 0 lo0
ifconfig:
Code:
age0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=319b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC>
ether 00:22:15:4b:f2:42
inet 10.100.43.136 netmask 0xffffff00 broadcast 10.100.43.255
inet 10.100.41.59 netmask 0xffffff00 broadcast 10.100.41.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2808<VLAN_MTU,WOL_UCAST,WOL_MAGIC>
ether 00:21:91:7a:a3:de
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
inet 118.169.36.149 --> 168.95.98.254 netmask 0xffffffff
Opened by PID 773
Now the first propose is ok, but the second is not.
Would you please help me to check the pf.conf?