macOS - pf.conf - routing from one interface to another based on user

Viewed 94

I have multiple interfaces, and want to config how the traffic will go out based on the users, for example:

  • I have two users: admin and testuser
  • I have two network interfaces: en0 and en1
  • I want that all the traffic from admin routing to en0 and all the traffic from testuser routing to en1

I tried to modify /etc/pf.conf for testuser as below:

pass in route-to { en1 } all user { testuser }
pass out route-to { en1 } all user { testuser }

When I login as testuser and did curl, no response was returned. It seems that it was routed to en1 but the reply was rejected? What did I miss here, what is the right way to achieve this?

0 Answers
Related