Created
July 8, 2017 20:55
-
-
Save alekstrust/0295647aff44ae864e6792a39064361f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sysctl -w net.inet.ip.forwarding=1 | |
sudo sysctl -w net.inet.ip.fw.enable=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo pfctl -d | |
sudo pfctl -F all | |
sudo pfctl -f /etc/pf.conf -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the following lines to /etc/pf.conf immediately after rdr-anchor "com.apple/*": | |
# Bridge network | |
lan="{192.168.2.0/24}" | |
# Bridge interface | |
ext_if=bridge100 | |
# VPN interface | |
vpn_if="utun0" | |
nat on $ext_if from $lan to any -> ($ext_if) | |
nat on $vpn_if from $lan to any -> ($vpn_if) |
Actually, i've just realised that this code does not always start bridge100. I did a restart and now when i run the code it is not working? Any ideas?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This absolutely saved my life - thank you!! Can i ask, what code would i use to disable/unload bridge100?