Jump to content

Help with dhcp options

Recommended Posts

I'm trying to setup a NAT with a DHCP server on the LAN side that will deliver a custom custom DHCP option to my victim. I have tried adding the dhcp_option list to dnsmasq

# custom 

function setup() {
    # Show SETUP LED

    # Set the network mode to NAT
    sleep 5

    uci add_list dhcp.@dnsmasq[-1].dhcp_option='224,"my_payload_string"'

    # Restart dnsmasq with the new configuration
    /etc/init.d/dnsmasq restart	

function run() {
    # Show  ATTACK LED

or replacing dnsmasq with lan

    #uci add_list dhcp.@dnsmasq[-1].dhcp_option='224,"my_payload_string"'
    uci add_list dhcp.lan.dhcp_option='224,"my_payload_string"'

Neither approach works as I don't see option 224 in the DHCP Ack

Can anyone help?

Link to post
Share on other sites

Thanks for the suggestion. I have read that and made another test:

dhcp.lan.dhcp_option='224,' '42,'

Now I see option 42 in the DHCP Ack message but not 224


Link to post
Share on other sites

I got it to sort-of work by adding this to /etc/dnsmasq.conf


Very strange but good enough for now. Thanks!

  • Like 1
Link to post
Share on other sites
Posted (edited)

Oh i see, option 224 is a "reserved" space. 


Its probably blocked normally, that's why you need to force it. I'm not sure how/if you can force something like that from uci, but I have not looked too deeply into that.

I'm kind of curious if you tried

uci add_list dhcp.lan.dhcp_option_force='224,"my_payload_string"'

what would happen, if part of the uci configure would work like that.

Edited by kdodge
new idea
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...