Hi all,
I created a jail using Bastille. I would like to redirect traffic to the jail with haproxy.
Somehow, the redirect does not work, I am not able to reach my python server externally.
Here is the list of jails given by Bastille:
My haproxy.conf:
My pf.conf
I've also created an rdr for the jail, which shows in ifconfig's out:
I started a python server inside the jail, which I can reach whith curl
I've configured pf based on Bastille's documentation, added the rdr, configured haproxy...
What did I miss?
Thanks.
I created a jail using Bastille. I would like to redirect traffic to the jail with haproxy.
Somehow, the redirect does not work, I am not able to reach my python server externally.
Here is the list of jails given by Bastille:
Code:
# bastille list
JID IP Address Hostname Path
vanilla 10.17.89.1 vanilla /usr/local/bastille/jails/vanilla/root
My haproxy.conf:
Bash:
defaults
mode http
timeout client 10s
timeout connect 5s
timeout server 10s
timeout http-request 10s
frontend something.xyz
bind :80
acl host_vanilla hdr(host) -i vanilla.something.xyz
use_backend vanilla if host_vanilla
backend vanilla
server node1 10.17.89.1:8000
My pf.conf
Code:
ext_if="em0"
set block-policy return
scrub in on $ext_if all fragment reassemble
set skip on lo
table <jails> persist
nat on $ext_if from <jails> to any -> ($ext_if:0)
rdr-anchor "rdr/*"
block in all
pass out quick keep state
pass in inet proto tcp from any to any port ssh flags S/SA keep state
I've also created an rdr for the jail, which shows in ifconfig's out:
Code:
em0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=481209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWFILTER,NOMAP>
ether ca:05:6a:1c:96:1b
inet .172.212.92 netmask 0xffffff00 broadcast 79.172.212.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
bastille0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 fe80::1%bastille0 prefixlen 64 scopeid 0x3
inet 10.17.89.1 netmask 0xffffffff
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
I started a python server inside the jail, which I can reach whith curl
Code:
curl 10.17.89.1:8000
I've configured pf based on Bastille's documentation, added the rdr, configured haproxy...
What did I miss?
Thanks.