Add forwarding for port 8081 to the jail.

This commit is contained in:
Tom Alexander 2022-11-12 15:11:15 -05:00
parent 9dda4875c0
commit 3dd96dcc2c
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 7 additions and 3 deletions

View File

@ -1,2 +1,2 @@
[headless]
homeserver ansible_user=talexander ansible_host=192.168.1.215
homeserver ansible_user=talexander ansible_host=192.168.1.123

View File

@ -17,8 +17,11 @@ set skip on lo
nat on $ext_if inet from $jail_net_v4 to { any, !$jail_net_v4 } tag ALLOWED -> (wlan0)
nat on $ext_if inet from $full_nat_v4 to { any, !$full_nat_v4 } tag ALLOWED -> (wlan0)
rdr on host_uplink0 inet proto {tcp, udp} from any to 10.193.223.1 port 53 tag ALLOWED -> 1.1.1.1 port 53
rdr on host_uplink1 inet proto {tcp, udp} from any to 10.213.177.1 port 53 tag ALLOWED -> 1.1.1.1 port 53
rdr pass on host_uplink0 inet proto {tcp, udp} from any to 10.193.223.1 port 53 tag ALLOWED -> 1.1.1.1 port 53
rdr pass on host_uplink1 inet proto {tcp, udp} from any to 10.213.177.1 port 53 tag ALLOWED -> 1.1.1.1 port 53
nat pass on host_uplink0 inet proto tcp from any to any port 8081 tag ALLOWED -> (host_uplink0)
rdr pass on $ext_if inet proto tcp from any to any port 8081 tag ALLOWED -> 10.193.223.20 port 8081
# filtering
block log all

View File

@ -8,6 +8,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SLEEP_INTERVAL=${SLEEP_INTERVAL:-30}
while true; do
# TODO: Why not vm.stats.vm.v_page_size ? Are these the same?
page_size=$(sysctl -n hw.pagesize)
free_pages=$(sysctl -n vm.stats.vm.v_free_count)
free_bytes=$((page_size * free_pages))