Menu

fixed ip address per user in FreeBSD

Help
Anonymous
2004-05-27
2012-09-17
  • Anonymous

    Anonymous - 2004-05-27

    Hello,

    I am switching my poptop from Linux to FreeBSD.  In Linux I was able to provide fixed ips to the clients based on their username in the following way:

    # client        server  secret                  IP addresses
    user1        *       fakepass 192.168.100.1
    user2    *       fakepass 192.168.100.2

    the format of /etc/ppp/ppp.secret under FreeBSD does not seem to support this as it has only:

    # client    secret
    user1 fakepass
    user2 fakepass

    I need to reproduce the behavior of clients receiving a specific fixed address based on username.  Any ideas how I can go about doing that? I was looking at my FreeBSD's ppp.conf which has the line:

    set ifaddr 192.168.2.78 192.168.0.1-192.168.0.10 255.255.255.0

    If I could figure out how to change the ips based on some parameter passed to this script .... but I have no idea how to start or where to look. 

    Thanks for any ideas.

    Tomas

     
    • Anonymous

      Anonymous - 2004-05-28

      I figured out this problem by myself and am posting the solution for anyone interested.

      the format of /etc/ppp/ppp.secret supports the following:

      # client secret clientIP
      user1 fakepass 192.168.0.1
      user2 fakepass 192.168.0.2

      so the difference seems to be that you can't specify the server address like with Linux, but the rest is the same.

      Tomas

       

Log in to post a comment.