In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
First, run the following command in turn:
Cd / etcls | grep pf.confsudo cp pf.conf pf.conf.normal.baksudo cp pf.conf pf.conf.transmit.bakls | grep pf.conf
2. Modify pf.conf pf.conf.transmit.bak
Sudo gedit pf.conf.transmit.bak
OR:
Sudo vim pf.conf.transmit.bak
The modified content refers to the previous blog post that configured port forwarding. Here is (comment ignored, for reference only):
Scrub-anchor "com.apple/*" nat-anchor "com.apple/*" rdr-anchor "com.apple/*" rdr on lo0 inet proto tcp from any to 127.0.0.1 port 80-> 127.0.0.1 port 8080dummynet-anchor "com.apple/*" anchor "com.apple/*" load anchor "com.apple" from "/ etc/pf.anchors/com.apple"
After the modification, save it.
Create startup and shutdown script files
1. Find a folder that is convenient for you to find, such as the desktop, and create a startup.sh file to enable port forwarding, as follows:
Cp / etc/pf.conf.transmit.bak / etc/pf.confsudo pfctl-dsudo pfctl-f / etc/pf.confsudo pfctl-e
two。 Create a shutdown.sh file to turn off port forwarding, as follows:
Cp / etc/pf.conf.normal.bak / etc/pf.confsudo pfctl-dsudo pfctl-f / etc/pf.confsudo pfctl-e
Summary
The above is the script configuration method of opening and closing port forwarding under Mac introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.