Few questions from unexperienced user


Recently I downloaded DNSCrypt-proxy 2 to my BPI-R2 with LEDE (https://github.com/jedisct1/dnscrypt-proxy/releases/tag/2.0.7)
Program itself is working good but I have few questions about init.d scripts. dnscrypt-proxy don’t have --daemon option. When I put it to init.d it hanging entire boot process.
Only one solution that I found is to start it is:

(dnscrypt-proxy -config … -pidfile …)&

  1. Is there a possibility to “daemonize” progam in init.d script in LEDE?

Dnscrypt-proxy is starting as root. To change user I put into init.d script:

(sudo -u SomeUser dnscrypt-proxy -config … -pidfile …)&

  1. Is there a other way to run as non-root user in init.d script in LEDE?

After it started as non-root user program didn’t have permission to bind addres: permission denied.

  1. Is there way to set file capabilities in LEDE, like: (https://github.com/jedisct1/dnscrypt-proxy/wiki/installation)

setcap cap_net_bind_service=+pe dnscrypt-proxy

And now off-topic:

My ISP is forcing me to use their router. To avoid this I need to VLAN.

  1. How to complie LEDE with switch support? My swconfig shows notching.

Thank you in advance.

Regards, Andrzej Bialic

To vlan tag traffic you can try:

vconfig add $IFACE $TAGID

For my ISP, i do

vconfig add eth1 6

Then you should have a new interface cal eth1.6 to run pppoe.

I should extend my question more.
On my ISP’s forum https://forum.t-mobile.nl/t-mobile-thuis-algemeen-490/draytek-vervangen-met-je-eigen-router-297061(Dutch language) I founded this:

IGMP Snooping: uitschakelen (turn off)
IGMP Proxy: uitschakelen (turn off)
IGMP Version: V2 (turn on)
IPTV/VLAN inschakelen (turn on)
Internet Vlan ID: 300 Priority 0
802.1Q tag inschakelen (turn on)

So I witll do some tries. Thank you.

so it is

vconfig add $IFACE 300
1 Like

It’s working like a charm :slight_smile:
Only problem is that it’s not saving it permanently and I must do it after every reboot.

Thank you very much for your help :smile:

To do on boot on debian system

auto wan
iface wan inet manual
        pre-up vconfig add $IFACE 6 && ifconfig $IFACE up 
        pre-down ifconfig $IFACE down && vconfig rem $IFACE 6

I will try to fing out how to make it on LEDE.

Thanks, you made my day anyway.