The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

9

The obvious choice would be if stealth mode were on. That blocks pings to localhost on all my Mac OS systems. Go to System Preferences, Security & Privacy, Firewall, Firewall Options... Also, if you have "Block all incoming connections" that might also affect things. I would certainly turn off LittleSnitch since it also can and will block that sort of ...


7

I found the solution: sudo ifconfig lo0 192.168.64.88 alias sudo ipfw add fwd 127.0.0.1,9790 tcp from me to 192.168.64.88 dst-port 80 After a restart you have to run this commands again.


3

Has been a while since I've used ipfw but running the following commands on all relevant computers should do the trick: sudo ipfw -f flush sudo ipfw add allow tcp from me to 192.168.0.0/24 sudo ipfw add allow ip from me to 192.168.0.0/24 sudo ipfw add deny tcp from me to any sudo ipfw add deny ip from me to any To disable just run sudo ipfw flush ...


3

the replacement is pf, see man pfctl. also, see man dnctl for traffic shaping purposes. Apple's Network Link Conditioner utility (only available in their developer downloads section, behind a login) uses these two facilities to do its thing.


3

To enable NAT for a host-only network in VMware Fusion do the following: Enable forwarding by adding a file /etc/sysctl.conf with the content: net.inet.ip.forwarding=1 and reboot Connect the Mac to the host-only network and make a note of the network/netmask of the host.only network: Enter ifconfig to get the vmnet IP of the Mac ... vmnet3: flags=8863&...


2

To open a port you would use the following line(s): pass in proto tcp from any to any port 40000 pass in proto tcp from any to any port 80 pass in proto {tcp, udp} from any to any port 53 pass in from any to any port 3601 To quick-start pf and open a port with one of the lines above use e.g.: echo "pass in proto tcp from any to any port 40000" | sudo ...


2

Little Snitch (a highly customizable firewall for macOS) has the functionality you are looking for. First create a profile for a VPN connection. (allow all in/out traffic) Then create a second profile, which would block all in/out traffic. Lastly, set-up automatic profile switching based on the current state of connection to the VPN server. Check out ...


1

The main idea is simply blocking all connections and pass only through lo/tun/vpn interfaces. block in log block out log set skip on lo0 # Pass packets that go through TUN interfaces pass in quick on { utun0 utun1 } all pass out quick on { utun0 utun1 } all # Pass packets that go to/from VPN server. # Your VPN server IP vpn = "0.0.0.0" pass in on en0 ...


1

You can simply replace: table <attackers> persist block log quick from <attackers> pass in quick proto tcp from any port ssh flags S/SA keep state (max-src-conn 3, max-src-conn-rate 5/60, overload <attackers> flush global) with: table <attackers> persist block log quick from <attackers> pass in quick proto tcp from any flags ...


1

To increase the number of possible dynamic rules you have to either create /etc/sysctl.conf with the content net.inet.ip.fw.dyn_max=32768 or if the file already exists, add the respective line. It's not sufficient to change the value temporarily with (sudo) sysctl -w net.inet.ip.fw.dyn_max=32768 because it will not survive a reboot.


1

Try using this command: echo "rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8000" | sudo pfctl -ef - That command should forward your port 80 to port 8000. I got that from this website http://salferrarello.com/mac-pfctl-port-forwarding/


1

Have you looked at this post (see comment dated 30 Aug from user mhils)? Basically, running in mitmproxy in transparent mode can be accomplished with the -T argument. It appears that this is supposed to provide access to the PID of the source process, but I am not sure that the destination process id is captured. I am not a user of mitmproxy, so please ...


1

According to what you're trying to achieve, your rule is in a wrong position. This Source will show you how to set up a rule. However, you're navigation FROM: sudo ipfw add 100 fwd 10.37.129.3,3389 tcp from any to any 3389 in Please don't hit me with a stick, I'm unable to forward this on my Mac to test.


1

This thread over the FreeBSD forums suggests that pf works on iOS. Disclaimer: I haven't tested this myself. Edit: pfctl -sr as root returns: No ALTQ support in kernel ALTQ related functions disabled and no rules whatsoever, but it seems that pf is there


1

Although you seem fine handling the command line, on OS X it is best to use the Server Admin Tools (like @lupincho suggested). But how can you use the Server Admin Tools GUI when you only have terminal acces? You can run the Server Admin Tools app from another mac, this will allow you to login on a remote server and change it's settings. If you do not have ...


1

See OS X Server: About the Firewall service. Although the topic is about OS X Server, the last paragraph says: Additional Information The ipfw command is deprecated in Mountain Lion. If you want to manually configure Firewall rules, use the pfctl binary for forward compatibility. For instructions, see man pfctl.


Only top voted, non community-wiki answers of a minimum length are eligible