Re: [OpenWrt-Devel] Read-only copy of Wiki?

2018-10-19 Thread Nguyễn Hồng Quân
Hi

On Mon, Aug 20, 2018 at 11:40 PM Thomas Endt  wrote:

> Von: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] Im
> Auftrag von Nguy?n H?ng Quân
> 1) wiki.openwrt.org (that's the old wiki)
> 2) openwrt.org (that's the new wiki)
>
>
I meant the 2nd one (this one is newer and more up-to-date with new
hardware, right?)


>
> > So I would like to host a read-only copy of it, to serve as reference
> documentation.
> >Is this possible? Can you help export the wiki?
>
> There are several ways to get the wiki content without any wiki admin
> action.
> Have you tried e.g. an offline-reader plugin for your browser already?
>

I use Firefox and when I search its add-on with keywords "wiki offline", I
only find Wikipedia-related add-ons, not general wiki.
-- 
Quân

Nguyễn Hồng Quân
☎ 093 9030 338
Facebook: ng.hong.quan
 quan.hoabinh.vn  agriconnect.vn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Read-only copy of Wiki?

2018-08-20 Thread Nguyễn Hồng Quân
Hi

The OpenWrt wiki is sometimes too slow to access from my country. So I
would like to host a read-only copy of it, to serve as reference
documentation.

Is this possible? Can you help export the wiki?

Thanks

-- 
Quân

quan.hoabinh.vn  agriconnect.vn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [Bug] Trunk (DD) doesn't build dnsmasq-full with ipset

2016-09-06 Thread Nguyễn Hồng Quân
Because I cannot report in Trac (Error: Submission rejected as potential
spam), I have to report here.

I chose to build dnsmasq-full with option "with ipset support" on. But
after building, the produced dnsmasq-full doesn't have that feature. It
prevents dhcp server from starting and work. Please fix.

System log:

Tue Aug 30 10:37:23 2016 daemon.crit dnsmasq[1041]: recompile with
HAVE_IPSET defined to enable ipset directives at line 38 of
/etc/dnsmasq.conf
Tue Aug 30 10:37:23 2016 daemon.crit dnsmasq[1041]: FAILED to start up
Tue Aug 30 10:37:26 2016 daemon.crit dnsmasq[1101]: recompile with
HAVE_IPSET defined to enable ipset directives at line 38 of
/etc/dnsmasq.conf
Tue Aug 30 10:37:26 2016 daemon.crit dnsmasq[1101]: FAILED to start up
Tue Aug 30 10:37:31 2016 daemon.crit dnsmasq[1105]: recompile with
HAVE_IPSET defined to enable ipset directives at line 38 of
/etc/dnsmasq.conf
Tue Aug 30 10:37:31 2016 daemon.crit dnsmasq[1105]: FAILED to start up
Tue Aug 30 10:37:36 2016 daemon.crit dnsmasq[1109]: recompile with
HAVE_IPSET defined to enable ipset directives at line 38 of
/etc/dnsmasq.conf
Tue Aug 30 10:37:36 2016 daemon.crit dnsmasq[1109]: FAILED to start up
Tue Aug 30 10:37:41 2016 daemon.crit dnsmasq[1123]: recompile with
HAVE_IPSET defined to enable ipset directives at line 38 of
/etc/dnsmasq.conf
Tue Aug 30 10:37:41 2016 daemon.crit dnsmasq[1123]: FAILED to start up

-- 
Quân
***
* Nguyễn Hồng Quân*
* ☎ 093 9030 338  *
* Facebook: ng.hong.quan  *
*  quan.hoabinh.vn  *
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Dynamically generate custom files before building?

2015-03-24 Thread Nguyễn Hồng Quân
Hi

On Wed, Mar 25, 2015 at 12:33 AM, Sami Olmari s...@olmari.fi wrote:

 Why not use ./scripts/env with your own batchfile? It has all the things
 you need for multiple hardware configurations on single buildroot... only
 thing you need to do is automate it with bash-script etc...

I tried the script:

$ ./scripts/env
Usage: ./scripts/env [options] command [arguments]
Commands:
help  This help text
list  List environments
clear Delete all environment and revert to flat config/files
new nameCreate a new environment
switch name Switch to a different environment
delete name Delete an environment
rename newname  Rename the current environment
diff  Show differences between current state and environment
save  Save your changes to the environment
revertRevert your changes since last save

Options:


and I don't understand what it can do :-(

-- 
Quân
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Facebook: ng.hong.quan  *
* Web: quan.hoabinh.vn*
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Dynamically generate custom files before building?

2015-03-24 Thread Nguyễn Hồng Quân
Thank Jean-Michel

Your script has many valuable information

On Wed, Mar 25, 2015 at 12:11 AM, Jean-Michel Pouré - GOOZE 
jmpo...@gooze.eu wrote:

  I think you should try to modify openwrt/Makefile
  Add your own script  for target devices.

 I am thinking about moving to a Makefile also.

 Currently, my scripts look like this one :
 *
 #git clone git://git.openwrt.org/openwrt.git openwrt-ar71xx
 cd openwrt-ar71xx

 #echo make dirclean
 #make dirclean

 echo git checkout
 git checkout master
 git pull

 echo updating feeds
 ./scripts/feeds update -a
 ./scripts/feeds install luci
 ./scripts/feeds install luci-proto-ipv6

 echo make defconfig
 rm -f .config
 echo  .config 'CONFIG_TARGET_ar71xx_generic_TLWR841=y'
 echo  .config 'CONFIG_PACKAGE_luci=y'
 echo  .config 'CONFIG_PACKAGE_luci-proto-ipv6=y'

 make defconfig

 echo compiling
 make -j 5
 *

 Next thing I would like to test is create custom targets. I am not very
 sure how to work. But basically, can define
 CONFIG_TARGET_ar71xx_generic_TLWR841_myown

 I read on the wiki there was also the ability to compile all package and
 then use image builder to quickly build custom installers.

 At one point, if you need to initialize dozens of routers and APs, you
 probably want to use image builder.


About image builder, the wiki
http://wiki.openwrt.org/doc/howto/obtain.firmware.generate

*Image Generator* is the program that creates the OpenWrt firmware image
file. In the process of compiling OpenWrt
http://wiki.openwrt.org/doc/howto/build, *Image Generator* is coercively
created (compiled), because it is needed to eventually create the image
file. It is located in /openwrt/trunk/xxx and you can use it, to create
more image-files from the packages you obtained during compilation.

but I don't know what is xxx and also cannot find the trunk folder.
Could you please tell me where it is?
-- 
Quân
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Facebook: ng.hong.quan  *
* Web: quan.hoabinh.vn*
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Dynamically generate custom files before building?

2015-03-24 Thread Nguyễn Hồng Quân
Hi

What I mean is each target device will have its own default config files.
I'm thinking about /etc/config/network and /etc/config/wireless.

I want to dynamically generate the custom files of those network,
wireless and place in files/ folder. I want to find the default files,
modify it and copy to files/ folder. The modification will be set SSID, set
wireless password... Those actions are done by script.

The problem is I don't know where those default files are.


On Tue, Mar 24, 2015 at 12:11 PM, Christian Schoenebeck 
christian.schoeneb...@gmail.com wrote:

 For me a shell script is doing the job. Calling parameter is the target.
 I use a separate configuration directory beside building directory.
 I copy the correct files for the target into the files directory
 and the correct .config into building directory
 and then call make. All inside the script.


If I cannot know where those default are. I may have to use this approach.

Thank nam228, when I look into the Makefile, I see it mentions target
folder. This may be a hint to look for.

-- 
Quân
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Facebook: ng.hong.quan  *
* Web: quan.hoabinh.vn*
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Dynamically generate custom files before building?

2015-03-23 Thread Nguyễn Hồng Quân
Hello all

If I want to build customized OpenWrt, I need to place all custom file in
files/ folder.
The problem is that a set of custom files can only be applied to 1 device,
i.e /etc/config/wireless file for TP Link router can not be used for D-Link.

Is there any way that I can use a script to modify the default config file
for each target device, create the one in files/ folder before building?
Where can I find the default /etc/config/wireless target device?

Thanks

-- 
Quân
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Facebook: ng.hong.quan  *
* Web: quan.hoabinh.vn*
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Build ipk and make autostart?

2014-09-13 Thread Nguyễn Hồng Quân
Hello,

When I package an application to ipk file, how do I make the application to
automatically start?

I already make the init script, which is supposed to install to /etc/init.d/

I tried add these lines to Makefile

define Package/postinst
/etc/init.d/puppysplash enable
endef

where puppysplash is the name of application. But after building the
OpenWrt image with that application included, I didn't see the symlink in
/etc/rc.d/

So, what is the right way to do?

Thanks

-- 
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Facebook: ng.hong.quan  *
* Web: quan.hoabinh.vn*
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Build ipk and make autostart?

2014-09-13 Thread Nguyễn Hồng Quân
Hi Gerald

Thanks for your quick reply

On Sat, Sep 13, 2014 at 2:59 PM, Gerald Matzka mgeral...@yahoo.de wrote:


 Take a look at http://wiki.openwrt.org/doc/devel/packages - section
 Package/postinst.
 Seems you forgot the #!/bin/sh


Now I update the Makefile like this (there is no indentation)

define Package/postinst
#!/bin/sh
/etc/init.d/puppysplash enable
endef

but still, no symlink to /etc/init.d/puppysplash is created in /etc/rc.d/

-- 
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Facebook: ng.hong.quan  *
* Web: quan.hoabinh.vn*
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Build ipk and make autostart?

2014-09-13 Thread Nguyễn Hồng Quân
Hi Jiří,

My init script (puppysplash) is already executable as shown below

root@OpenWrt:~# ls -l /etc/init.d/
-rwxr-xr-x1 root root  1419 Apr 16 17:32 boot
-rwxr-xr-x1 root root   729 Sep 13 07:07 cron
-rwxr-xr-x1 root root   330 Dec 12  2013 defconfig
-rwxr-xr-x1 root root 13785 Sep 13 07:08 dnsmasq
-rwxr-xr-x1 root root   252 Apr 16 17:32 done
-rwxr-xr-x1 root root  4139 Sep 13 07:07 dropbear
-rwxr-xr-x1 root root  1022 Sep 13 07:08 firewall
-rwxr-xr-x1 root root  2015 Dec 12  2013 led
-rwxr-xr-x1 root root  2119 Sep 13 07:07 log
-rwxr-xr-x1 root root   835 Apr 16 17:33 luci_dhcp_migrate
-rwxr-xr-x1 root root   368 Sep 13 08:47 luci_fixtime
-rwxr-xr-x1 root root  2912 Apr 16 17:32 network
-rwxr-xr-x1 root root   244 Sep 13 07:07 odhcpd
-rwxr-xr-x1 root root   254 Sep 13 08:44 puppysplash
-rwxr-xr-x1 root root   125 Dec 12  2013 sysctl
-rwxr-xr-x1 root root   309 Apr 16 17:32 sysfixtime
-rwxr-xr-x1 root root   716 Sep 13 07:07 sysntpd
-rwxr-xr-x1 root root  1037 Apr 16 17:32 system
-rwxr-xr-x1 root root   926 Sep 13 07:07 telnet
-rwxr-xr-x1 root root  3411 Sep 13 07:07 uhttpd
-rwxr-xr-x1 root root   106 Apr 16 17:32 umount

But it doesn't start automatically.

On Sat, Sep 13, 2014 at 3:28 PM, Jiří Šlachta slac...@cesnet.cz wrote:

 Hi,

 there is no need to enable the init script in postinst. The only
 thing you need to make it start automatically is to give the executable
 bit to the init script.

 See below:

 define Package/package/install
 $(INSTALL_DIR) $(1)/etc/init.d
 $(INSTALL_BIN) ./files/package.init $(1)/etc/init.d/package
 endef


-- 
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Facebook: ng.hong.quan  *
* Web: quan.hoabinh.vn*
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Build ipk and make autostart?

2014-09-13 Thread Nguyễn Hồng Quân
Hi Ted

On Sat, Sep 13, 2014 at 11:16 PM, Ted Hess th...@kitschensync.net wrote:

 As Jiri said, you don't need a postinst function to enable the script.
 Your script should start with

 #!/bin/sh  /etc/rc.common

 and include the line:

 START=xx

 Where 'xx' is the startup position number you want your script executed in
 rc.d (Ex: START=95)

 See the example init script near the bottom in:
 http://wiki.openwrt.org/doc/devel/packages


Actually, my init script already has that START number. When I run
/etc/ini.d/puppyplash enable
manually by myself, a symlink is created in rc.d. But that symlink is only
created if you run the enable command. If you don't, there will be no
such file in the rc.d.
That's why I try to execute the enable command in  postinst.

-- 
Quân
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Facebook: ng.hong.quan  *
* Web: quan.hoabinh.vn*
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Original wifidog.conf file

2013-09-21 Thread Nguyễn Hồng Quân
Hello all

I found that the wifidog package built for OpenWrt uses different .conf
file from the one in upstream. Concretely, there is no HTTPDRealm option
in OpenWrt's one.

Is there a reason for that thing, and how to revert to the original one
when building?

Nice weekend.

-- 
***
* Nguyễn Hồng Quân*
* Y!M: ng_hquan_vn*
* Identi.ca: hongquan *
***
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenVPN in Backfire not start

2013-03-12 Thread Nguyễn Hồng Quân
Thank you all,
I can start OpenVPN server now.
Changing to  '127.0.0.1:31194' doesn't work, but removing the line does.

On Tue 12 Mar 2013 02:56:33 PM ICT, Bastian Bittorf wrote:
 * Nguyễn Hồng Quân quanngu...@mbm.vn [12.03.2013 08:47]:
 option 'management' '127.0.0.1 31194'

 maybe '127.0.0.1:31194' ?

 bye, bastian
--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] How to bridge 2 Wifi subnet

2013-01-29 Thread Nguyễn Hồng Quân
Hello,

Here is the picture for my question: http://i.imgur.com/pFwuhsZ.png

Two Wifi network A  B have same IP range (192.168.2.x) but separated.
Two routers connect to the same wired network via their WAN interface.

How can I bridge these two A  B network (with OpenWrt) so that:
- The IP is provided by one DHCP server in one router.
- Client in network A can ping to client in network B and vice versa.
- Can set the same ESSIS for two routers, so that user see only 1 ESSID
in his wifi list.

Is it possible to use DHCP server of wired network to provide IP for AB
clients?

Thanks in advance.

-- 
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to bridge 2 Wifi subnet

2013-01-29 Thread Nguyễn Hồng Quân
Thank you all,

I think I will choose 1st or 2nd solution by Luiz Angelo Daros, because 
I am not running a mesh network.

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] PPPoE not working on TP-Link 941ND firmware

2013-01-21 Thread Nguyễn Hồng Quân

Hello

I've just flashed my router TP-Link WR940N with OpenWrt Backfire and 
Attitude Adjustment (same firmware with 941ND). For both OpenWrt 
version, the WAN port does not work with PPPoE, though it works with 
static address protocol.


Could you let me know how to solve this?

Thanks!

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] PPPoE not working on TP-Link 941ND firmware

2013-01-21 Thread Nguyễn Hồng Quân

For more information, here is the log:
OpenWrt daemon.info pppd[2592]: Plugin rp-pppoe.so loaded.
OpenWrt daemon.info pppd[2592]: RP-PPPoE plugin version 3.8p compiled 
against pppd 2.4.5

OpenWrt daemon.notice pppd[2592]: pppd 2.4.5 started by root, uid 0
OpenWrt daemon.info dnsmasq[2012]: reading /tmp/resolv.conf.auto
OpenWrt daemon.info dnsmasq[2012]: using nameserver 192.168.1.200#53
OpenWrt daemon.info dnsmasq[2012]: using local addresses only for 
domain lan

OpenWrt daemon.warn pppd[2592]: Timeout waiting for PADO packets
OpenWrt daemon.err pppd[2592]: Unable to complete PPPoE Discovery
OpenWrt daemon.info pppd[2592]: Exit.
OpenWrt daemon.notice netifd: Interface 'wan' is now down`

On Mon 21 Jan 2013 04:30:55 PM ICT, Nguyễn Hồng Quân wrote:

Hello

I've just flashed my router TP-Link WR940N with OpenWrt Backfire and
Attitude Adjustment (same firmware with 941ND). For both OpenWrt
version, the WAN port does not work with PPPoE, though it works with
static address protocol.

Could you let me know how to solve this?

Thanks!



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] PPPoE not working on TP-Link 941ND firmware

2013-01-21 Thread Nguyễn Hồng Quân
Please ignore the last log. It is wrong (it is when I plugged out the 
wire).


Here is the correct one:

OpenWrt daemon.info pppd[4655]: Plugin rp-pppoe.so loaded.
OpenWrt daemon.info pppd[4655]: RP-PPPoE plugin version 3.8p compiled 
against pppd 2.4.5

OpenWrt daemon.notice pppd[4655]: pppd 2.4.5 started by root, uid 0
OpenWrt kern.info kernel: [ 2919.45] eth1: link up (100Mbps/Full 
duplex)

OpenWrt daemon.info pppd[4655]: PPP session is 7009
OpenWrt daemon.warn pppd[4655]: Connected to 00:00:5e:00:01:04 via 
interface eth1

OpenWrt daemon.info pppd[4655]: Using interface pppoe-wan
OpenWrt daemon.notice pppd[4655]: Connect: pppoe-wan -- eth1
OpenWrt daemon.info pppd[4655]: Terminating on signal 15
OpenWrt daemon.notice netifd: Interface 'wan' is now down
OpenWrt kern.info kernel: [ 2957.34] eth1: link down

On Mon 21 Jan 2013 04:51:57 PM ICT, Nguyễn Hồng Quân wrote:

Hello

I've just flashed my router TP-Link WR940N with OpenWrt Backfire and
Attitude Adjustment (same firmware with 941ND). For both OpenWrt
version, the WAN port does not work with PPPoE, though it works with
static address protocol.

Could you let me know how to solve this?

Thanks!



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] about m.uci:get!

2013-01-21 Thread Nguyễn Hồng Quân

Your config:

config pin
   option pincode1 '1'

means that pin is Typed Section, while the uci:get require a Named 
Section.
You can use uci:get_first() with Typed Section, or convert to Named 
Section like this

config general pin
 option
(general is Typed Section and pin now is Named Section)


On Mon 21 Jan 2013 02:40:53 PM ICT, . Elvis wrote:

Hi all,  Why I can not get pinpro value? I got empty!
/etc/config/verify
config pin
option pincode1 '1'
option oldcode '11'
option protect 'disable'

In the model/cbi
function code.write(self, section, value)
local pinpro = m.uci:get(verify, pin, protect)
 --- is empty
if pinpro == enable then
pincode:add_error(section, translate(enable))
else
pincode:add_error(section, translate(disable))
end
end

thanks all.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to check the field is empty?

2013-01-21 Thread Nguyễn Hồng Quân

Add this attribute to your option:
.optional = false

Your example will become:
code = s:option(Value, code, translate(Code))
code.option = false

(Don't understand what password means and why it is there).

On Mon 21 Jan 2013 05:25:19 PM ICT, . Elvis wrote:

hi all, If the field does not enter a value, how can display a warning
message(You must enter a value) !

 code = s:option(Value, code, translate(Code))
 code.password = true


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Get to RedBoot prompt in Atheros-based router

2013-01-17 Thread Nguyễn Hồng Quân

Thank for your care, Bastian.
I found the cause of the problem. From the boot fast detail, I tried 
increasing the baudrate and found that my router use 115200 speed. At 
this baudrate, the text shows well and I see that the router was using 
Micro Redboot, instead of standard one.
Based on the wiki for Micro Redboot, 
http://www.dd-wrt.com/wiki/index.php/Micro_Redboot, I can manage to get 
access via telnet (holding Reset button).


I hope that this story is added to OpenWrt to help someones like me.

On Thu 17 Jan 2013 08:52:17 PM ICT, Bastian Bittorf wrote:

* Nguyễn Hồng Quân quanngu...@mbm.vn [17.01.2013 11:44]:

To make the serial connection, I use a TTL-to-RS232 converter
circuit, which works well with La Fonera route before.


are you really on 9600 baud 8,N,1? if yes, resolder it.

bye, bastian


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Get to RedBoot prompt in Atheros-based router

2013-01-16 Thread Nguyễn Hồng Quân

Hello

On Wed 16 Jan 2013 06:06:09 PM ICT, Bastian Bittorf wrote:

http://wiki.openwrt.org/doc/hardware/port.serial#finding.serial.console

you are lucky! i'am ill at the moment and have time to
debrick an old dir300 via serial today. will post my experience.

Thanks in advance.
I determined serial pins based on 
http://wiki.openwrt.org/toh/d-link/dir-300#serial.port.jp1


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Get to RedBoot prompt in Atheros-based router

2013-01-16 Thread Nguyễn Hồng Quân

Hello Bastian,

On Wed 16 Jan 2013 07:42:02 PM ICT, Bastian Bittorf wrote:

* Nguyễn Hồng Quân quanngu...@mbm.vn [16.01.2013 13:15]:


I determined serial pins based on
http://wiki.openwrt.org/toh/d-link/dir-300#serial.port.jp1


here it is working out of the box:

screen /dev/ttyS0 9600

the board needs some time to boot the bootloader,
really slow 8-)


On my side, it is fast (I was checking it until the wireless LED is 
on). During that time, only weird characters (not readable) show in 
console.


To make the serial connection, I use a TTL-to-RS232 converter circuit, 
which works well with La Fonera route before.




what wondered me: if a DHCP is running in
your ethernet network it fetches and uses an IP
from there, so 192.168.1.1 is ofcourse not reachable.

bye, bastian


I disconnected all my other network interfaces. Use only eth0 between 
my PC and router (no 3rd machine).


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Flash from DD-WRT to OpenWrt for ASUS RT-N13U router

2013-01-16 Thread Nguyễn Hồng Quân

Hello all

Can I flash from DD-WRT to OpenWrt for ASUS RT-N13U B1 
(http://wiki.openwrt.org/toh/asus/rt-n13u) without serial access?


In the past, I flashed from stock firmware to DD-WRT using Asus 
Restoration Utility. This tool uses a single firmware file, while 
OpenWrt provides two files (squashfs and vmlinux). So I'm confused.


I also used DD-WRT web interface to upgrade with 
openwrt-ramips-rt305x-rt-n13u-squashfs-sysupgrade.bin file, but it failed.


Is there a common way to upgrade DD-WRT to OpenWrt, or it depends on device?

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Flash from DD-WRT to OpenWrt for ASUS RT-N13U router

2013-01-16 Thread Nguyễn Hồng Quân

Thank HeXiLeD,

Is there a way to determine which file is right?
After building firmware, I see these files:
- openwrt-ramips-rt305x-root.squashfs
- openwrt-ramips-rt305x-rt-n13u-squashfs-sysupgrade.bin
- openwrt-ramips-rt305x-uImage.bin
- openwrt-ramips-rt305x-vmlinux.bin
Sometimes, there is also xxx-squashfs-factory.bin file.

If flashing via serial, I know I need to use xxx-root.squashfs and 
xxx-vmlinux.bin.

If upgrade from OpenWrt, I know I need to use xxx-sysupgrade.bin.
But which file to use with mtd?


On Thu 17 Jan 2013 10:33:03 AM ICT, HeXiLeD wrote:

if the router is supported; access ddwrt via ssh and then

cd /tmp ;
wget http://url.to.openwrt.image.bin ;
mtd -r openwrt-image.bin linux

or

mtd -r openwrt-image.trx linux


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Get to RedBoot prompt in Atheros-based router

2013-01-15 Thread Nguyễn Hồng Quân

Hello,

On Tue 15 Jan 2013 05:31:45 PM ICT, Bastian Bittorf wrote:


it should be possible from DD-WRT/openwrt to alter variables from
redboot. look out for fconfig:

http://wiki.openwrt.org/doc/techref/bootloader/redboot


Unfortunately, because I cannot get access to RedBoot, I cannot reset 
that variable.
I'm trying the last option: serial port. But what I got in Terminal is 
all non-printable characters. Do you have experience in this? Maybe one 
of signal lines is erroneous?


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Get to RedBoot prompt in Atheros-based router

2013-01-14 Thread Nguyễn Hồng Quân

Hello all

I'm trying to flash OpenWrt to an old D-Link DIR-300 router. The router 
has contained DD-WRT already (not stock firmware), so I assume that its 
RedBoot listens at 192.168.1.1 when booting.


However, I tried many times with telnet 192.168.1.1 9000 and cannot 
get in. The error is always: No route to host (though the wired 
connection - eth0 - is OK).


I tried both when NetworkManager is active and when NetworkManager is 
disable.


Anyone has experience in this?

P/S: I also tried with IP 192.168.20.81 and failed.

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Get to RedBoot prompt in Atheros-based router

2013-01-14 Thread Nguyễn Hồng Quân

Hi Bastian,

I tried that script but failed at Waiting for the wireless router… 
(infinite waiting).
The scripted start from looking for factory bootloader step but as I 
told, the router has had DD-WRT already. This means factory bootloader 
was replaced.


I wonder if the time for RedBoot to wait for telnet was set to 0 by 
someone before.


On Mon 14 Jan 2013 05:58:06 PM ICT, Bastian Bittorf wrote:


I'm trying to flash OpenWrt to an old D-Link DIR-300 router. The


please use
http://wiki.openwrt.org/toh/d-link/dir-300#with.dir300-flash.sh.shell.script

the link is dead, but it's in the feed:
package/feeds/packages/dir300-flash


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Evenly distribute bandwidth for users?

2013-01-13 Thread Nguyễn Hồng Quân

Thank you all,
I'm reading carefully, because I don't understand at first :)

Regards

On Sat 12 Jan 2013 02:04:00 AM ICT, Sebastian Moeller wrote:

Hi there,

On Jan 11, 2013, at 05:16 , Brian J. Murrell wrote:


On 13-01-11 07:29 AM, etienne.champet...@free.fr wrote:

Hi

http://wiki.openwrt.org/doc/howto/packet.scheduler/packet.scheduler


Note that OP described wanting to distribute download bandwidth for
users.  The document you posted above is about shaping upload bandwidth.

As the above document states, one cannot really shape download
bandwidth but can only police it by dropping packets as they come in,
and then, that only works for TCP and not UDP.


I wonder about whether that is actually right. Looking at the 
definitions of shaping and policing it is quite clear that in the real world 
any shaper will also police (and if only by virtue of limited buffers at one 
point packets will be dropped, turning a shaper into a policer). Adding a 
shaper to san ingress policer offers the following advantage: the developing 
queue, especially if the queueing is per flow or close to per flow (as in a 
number of different queueing disciplines available) will give the policing 
component more information to pick which packets to fro or mark. Thus in the 
real world shaping can be considered, as a fancy way of policing, so any shaper 
will fall back being a policer (worst case scenario all buffers are filled and 
a new packet arrives).
Neither shapeing nor only policeing will be able to help against an 
inelastic UDP flood on the downstream. Especially if said flood consumes all 
link's bandwidth so even if the receiver drops all UDP packages no real traffic 
will make it through the bottleneck. This can only be solved on the head-end of 
the downstream; but inelastic UDP traffic is quite uncommon outside of DOS 
attacks, so this has nothing to do with the question of to shape or not to 
shape.
Where shaping will help is if several (longer-running) TCP flows compete the 
downlink, then shaping can help to distribute the speeds of these individual flows to 
fairly share the downstream bandwidth (depending on your shaper setup and 
definition of fair).
All of these facts (if actually) true seem to make the argument for using a 
shaper not a policer even on the remote end of a bottle-neck link like a 
typical cable/dsl/lte connection. Now, I could be just full of it, so please show me 
where my reasoning is off, and why policing is better than shaping.

best
Sebastian



b.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Evenly distribute bandwidth for users?

2013-01-11 Thread Nguyễn Hồng Quân

Hello,

I'm looking for how to make the OpenWrt router automatically distribute 
bandwidth for users. For example, one user is downloading a big file and 
slow down Internet speed for others. I want to limit that downloading.


I looked into QoS, but it seems that I have to specify a user (IP) to 
apply rule on. What I want is that the system can do this automatically.


Is there any package available for this need?

Thank you.

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt hang when turn wifi on

2012-12-18 Thread Nguyễn Hồng Quân

Hello Jonathan,

Do you mean that we should use newer version of OpenWrt?
I compiled new image from OpenWrt's trunk, but when I booted the 
router, it ran to an almost infinitive loop, without stopping for a 
command prompt.


But maybe my router broke, because when I flashed it with DD-WRT, it 
didn't work (even not bring up the Ethernet connection).


On Mon 17 Dec 2012 09:45:37 PM ICT, Jonathan Bither wrote:

Nguyen,
I apologize I just now got to look at the log. The image is
showing that it was created almost 1 year ago. This system is actually
still running Madwifi. Perhaps the device didn't actually upgrade with
your new image.


On 12/14/2012 09:06 PM, Nguyễn Hồng Quân wrote:

Hello Jonathan,

Here is my dmesg output before I enable wifi

On Fri 14 Dec 2012 09:07:57 PM ICT, Jonathan Bither wrote:

Hello Nguyen,
Would you be able to provide me with a 'dmesg' prior to starting
wifi?

On 12/14/2012 03:46 AM, Nguyễn Hồng Quân wrote:

Hello,

I'm building OpenWrt for Fonera router (FON2100) (Atheros target).
By default, Wifi is off. But when I turn on the Wifi, OpenWrt freezes.
There is even not output to Terminal (I flash firmware via serial
cable).

Did I build the firmware wrong or something else? Any help?

Thanks.



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] OpenWrt hang when turn wifi on

2012-12-14 Thread Nguyễn Hồng Quân

Hello,

I'm building OpenWrt for Fonera router (FON2100) (Atheros target).
By default, Wifi is off. But when I turn on the Wifi, OpenWrt freezes. 
There is even not output to Terminal (I flash firmware via serial cable).


Did I build the firmware wrong or something else? Any help?

Thanks.

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt hang when turn wifi on

2012-12-14 Thread Nguyễn Hồng Quân

Hello Jonathan,

Here is my dmesg output before I enable wifi

On Fri 14 Dec 2012 09:07:57 PM ICT, Jonathan Bither wrote:

Hello Nguyen,
Would you be able to provide me with a 'dmesg' prior to starting
wifi?

On 12/14/2012 03:46 AM, Nguyễn Hồng Quân wrote:

Hello,

I'm building OpenWrt for Fonera router (FON2100) (Atheros target).
By default, Wifi is off. But when I turn on the Wifi, OpenWrt freezes.
There is even not output to Terminal (I flash firmware via serial
cable).

Did I build the firmware wrong or something else? Any help?

Thanks.



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan


dmesg.txt.gz
Description: GNU Zip compressed data
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] nixio.TLSContext not found

2012-10-03 Thread Nguyễn Hồng Quân

Hello
I'm using luci (on OpenWrt backfire) to write a client for TLS-wrapped 
TCP protocol.

However, this line
require nixio.TLSContext
fails with error:
module 'nixio.TLSContext' not found

How can I fix this?

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] nixio.TLSContext not found

2012-10-03 Thread Nguyễn Hồng Quân

Hi
Le 03/10/2012 16:11, Jo-Philipp Wich a écrit :

You need to enable a crypto backend in luci-lib-nixio and then
recompile. The default builds do not inclue crypto capabilities in the
nixio library due to size constraints.

Sorry for stupid question, but how to enable the crypto backend?

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] nixio.TLSContext not found

2012-10-03 Thread Nguyễn Hồng Quân

Hi Jo-Philipp,

I did:
- Run make clean
- Choose TLS provider (OpenSSL) and luci in make menuconfig
- Run make package/luci/compile V=99
- I get luci-lib-nixio_0.10+svn9138-1_x86.ipk and install it with opkg 
install --force-downgrade.


However, the error module 'nixio.TLSContext' not found still exists.

What did I do wrong?

Le 03/10/2012 16:42, Jo-Philipp Wich a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.


Sorry for stupid question, but how to enable the crypto backend?

Run make menuconfig - navigate to LuCI - Libraries and in the
TLS Provider field choose OpenSSL or CyaSSL instead of disabled.

Afterwards recompile with make package/luci/{clean,compile} V=99 and
install the resulting luci-lib-nixio ipk package on your router.



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] nixio.TLSContext not found

2012-10-03 Thread Nguyễn Hồng Quân

I did wrong.
Instead of using
require nixio.TLSContext
I should use
tls = nixio.tls(client)

Le jeu. 04 oct. 2012 09:37:12 ICT, Nguyễn Hồng Quân a écrit :

Hi Jo-Philipp,

I did:
- Run make clean
- Choose TLS provider (OpenSSL) and luci in make menuconfig
- Run make package/luci/compile V=99
- I get luci-lib-nixio_0.10+svn9138-1_x86.ipk and install it with
opkg install --force-downgrade.

However, the error module 'nixio.TLSContext' not found still exists.

What did I do wrong?



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] How to write TCP client with nixio

2012-10-03 Thread Nguyễn Hồng Quân

Hello,
I want to create c TCP client, with TLS support, based on nixio.
From the API reference, I tried this

require nixio

local s = nixio.socket(inet, stream)
local tls = nixio.tls(client)
local ssoc = tls:create(s)
print Connect
local c = ssoc:connect()

But I don't know how to specify the address this client connect to, 
because the TLSSocket:connect ()

function does not accept arguments.

What is the right procedure to create TCP client?

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to write TCP client with nixio

2012-10-03 Thread Nguyễn Hồng Quân

I found the answer, that is I have to put
Socket:connect (host, port)
before
TLSSocket:connect ()

Le jeu. 04 oct. 2012 11:25:25 ICT, Nguyễn Hồng Quân a écrit :

Hello,
I want to create c TCP client, with TLS support, based on nixio.
From the API reference, I tried this

require nixio

local s = nixio.socket(inet, stream)
local tls = nixio.tls(client)
local ssoc = tls:create(s)
print Connect
local c = ssoc:connect()

But I don't know how to specify the address this client connect to,
because the TLSSocket:connect ()
function does not accept arguments.

What is the right procedure to create TCP client?



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Remote admin for multiple routers

2012-09-27 Thread Nguyễn Hồng Quân
Hello,

I'm thinking about creating an admin interface to manage multiple
OpenWrt routers at the same time.
Is there anyone having experience in this?

I've just sketched a scheme about the components and how they work
https://docs.google.com/presentation/d/1OnqJAZqUMEtK5m3ITr8eTLH3Jne38dsmbpNtVZ3EPWg/edit

Advice is appreciated!

-- 
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Single SSID for multiple AP in routed mode?

2012-09-25 Thread Nguyễn Hồng Quân
Hello,

Normally, when setting up network of multiple routers with single ESSID,
they set router in AP mode.
Is this setup possible with router in routed AP mode?

Thanks.

-- 
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Station mode for Fonera router?

2012-09-24 Thread Nguyễn Hồng Quân
Hello all,
I'm trying to set Fonera FON2100 router to station mode, following this
tutorial: http://wiki.openwrt.org/doc/recipes/routedclient#using.masquerade

After changing the configuration to this:
wireless.wifi0=wifi-device
wireless.wifi0.type=atheros
wireless.wifi0.channel=auto
wireless.@wifi-iface[0]=wifi-iface
wireless.@wifi-iface[0].device=wifi0
wireless.@wifi-iface[0].mode=sta
wireless.@wifi-iface[0].ssid=OpenWrt
wireless.@wifi-iface[0].encryption=none

I ran wifi and got:
root@OpenWrt:~# wifi
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument

The wireless does not works (no OpenWrt SSID show, the wireless LED blinks).

Is there anyone successful with this?

Thanks

-- 
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Station mode for Fonera router?

2012-09-24 Thread Nguyễn Hồng Quân
Thanks.

I misunderstood about client mode.

I want to setup like this:

Router connect via Ethernet port with 192.168.1.x network.
Router create a network 192.168.2.x via its wifi.

All client in 192.168.2.x can see each others but do not need to see 
192.168.1.x.

How can I do?

How I tried on my router  (FON2100) and not successful:
- Tie wan interface to eth0, with address 192.168.1.x (static)
- Tie lan interface to wifi0, with address 192.168.2.x (static), wifi 
in AP mode.
 From router, I can ping to 192.168.1.x, but from the machine connect to 
wifi, I cannot ping to other 192.168.2.x machine.

Thanks.

Le lun. 24 sept. 2012 16:16:17 ICT, Jo-Philipp Wich a écrit :
 * *DÉBUT CONTENU CHIFFRÉ ou SIGNÉ* *

 Hi.

 The wireless does not works (no OpenWrt SSID show, the wireless LED
 blinks).

 Erm, it is normal that no SSID shows in station mode. You're client to
 another network and you're supposed to set the SSID and crypto
 settings to those of the target AP you're joining to.


 ~ Jow


 ** *FIN CONTENU CHIFFRÉ ou SIGNÉ* **

 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel




--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] iptables to redirect traffic through AP router?

2012-09-24 Thread Nguyễn Hồng Quân
Hello

I run a router in AP mode and want to setup iptables rule to redirect
traffics to Google AdSense to a proxy. I added this chain and rule to
NAT table:
1. Create GoogleAds chain
-N GoogleAds
2. Append this chain to PREROUTING chain
-A PREROUTING -j GoogleAds
3. In GoogleAds chain, I make some rules:
-A GoogleAds -d 74.125.235.25/32 -p tcp -m tcp --dport 80 -j REDIRECT
--to-ports 
-A GoogleAds -d 74.125.235.26/32 -p tcp -m tcp --dport 80 -j REDIRECT
--to-ports 
-A GoogleAds -d 74.125.235.13/32 -p tcp -m tcp --dport 80 -j REDIRECT
--to-ports 

But the problem is that no traffic is driven to those rules, though it
is driven to GoogleAds chain
Screenshot: http://i.imgur.com/bpRBE.png

I suspect this is related to AP mode of router. I tried on OpenWrt on
VirtualBox and successful.

How should right iptables rule is?

(I brought the GoogleAds chain to POSTROUTING, but got error ip_tables:
REDIRECT target: bad hook_mask 0x10/0x9)

Thanks.

-- 
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Station mode for Fonera router?

2012-09-24 Thread Nguyễn Hồng Quân
Thanks for the link,

I did after the tutorial:
root@OpenWrt:~# uci show network.wifi
network.wifi=interface
network.wifi.proto=static
network.wifi.ipaddr=192.168.2.1
network.wifi.netmask=255.255.255.0
network.wifi.gateway=192.168.2.1
network.wifi.dns=192.168.1.200

root@OpenWrt:~# uci show wireless.@wifi-iface[0]
wireless.cfg03da6c=wifi-iface
wireless.cfg03da6c.device=wifi0
wireless.cfg03da6c.network=wifi
wireless.cfg03da6c.mode=ap
wireless.cfg03da6c.ssid=OpenWrt

root@OpenWrt:~# uci show dhcp.wifi
dhcp.wifi=dhcp
dhcp.wifi.interface=wifi
dhcp.wifi.start=100
dhcp.wifi.limit=150
dhcp.wifi.leasetime=12h

root@OpenWrt:~# uci show firewall.@zone[2]
firewall.cfg08b824=zone
firewall.cfg08b824.name=wifi
firewall.cfg08b824.input=ACCEPT
firewall.cfg08b824.output=ACCEPT
firewall.cfg08b824.forward=REJECT

root@OpenWrt:~# uci show firewall.@forwarding[1]
firewall.cfg0ce905=forwarding
firewall.cfg0ce905.src=wifi
firewall.cfg0ce905.dest=wan
root@OpenWrt:~# uci show firewall.@forwarding[2]
firewall.cfg0eee1a=forwarding
firewall.cfg0eee1a.src=lan
firewall.cfg0eee1a.dest=wifi
root@OpenWrt:~# uci show firewall.@forwarding[3]
firewall.cfg10ba3a=forwarding
firewall.cfg10ba3a.src=wifi
firewall.cfg10ba3a.dest=lan

Now I can only access Internet from the router, not other machine in 
wifi network.

What did I do wrong?

Thanks

Le lun. 24 sept. 2012 16:54:11 ICT, Jo-Philipp Wich a écrit :
 http://wiki.openwrt.org/doc/recipes/routedap

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] How to build luci-app-xxx package

2012-08-19 Thread Nguyễn Hồng Quân
Hello,

I wrote an application based on LuCI. Now I want to build a
luci-app-xxx.ipk package from the source, how can I do.

I referenced the luci-app-pbx-0.10.tar.gz in
https://lists.openwrt.org/pipermail/openwrt-devel/2011-October/012538.html,
but I found the folder structure is different from the source code
folder (it has a src folder, but the source code has luasrc, dist
folders).

So, please tell me to do.

Thanks.

-- 
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Global variables live across LuCI modules

2012-08-13 Thread Nguyễn Hồng Quân
Hello,

I'm writing a LuCI app with two modules. I want to keep a data generated
in this module and accessed from other module. Is there any way to do
that? Because LuCI run embedded in uhttpd, I think there may be a way to
have a variable live with uhttpd and accessible from LuCI.

Or, if inside a LuCI module, can there be a global variable live through
handler functions (function called when we access a URL registered by
entry() function?

I'm new to Lua.

Thanks.

-- 
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Setup domain for router?

2012-08-06 Thread Nguyễn Hồng Quân

Hello everybody,

How can I setup a domain name for OpenWrt-powered router, for example
splash.local?

My purpose is to make a redirection URL for an OAuth app, so that after 
logging in, the OAuth provider (Facebook) will redirect browser to a 
page hosted in router (where we will capture the access token returned 
by Facebook).

Thanks.

--
Regards,
Quân

Y!IM: ng_hquan_vn

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Filter HTTPS traffic based on URL?

2012-08-06 Thread Nguyễn Hồng Quân

Thank you all.

On Tue 07 Aug 2012 03:30:37 AM ICT, Daniel Golle wrote:


On 06/08/12 22:57, Felix Fietkau wrote:

Do you have any solution?

There really is no good way to filter HTTPS traffic. It requires
intercepting the SSL connection and doing a man-in-the-middle-attack on
it, which requires a certificate (otherwise it'll trigger nasty warnings
on the client side). You could have automatic whitelisting  for IPs
based on DNS requests, but that's complex and probably unreliable.

What about intercepting SNI?
All modern browsers announce the URL they are requesting in the intial phase of
the SSL handshare and before the connection is authenticated [1].
Anyway, just a thought which came up, not sure if it's actually possible after
all, but maybe worth the research.

1: http://en.gentoo-wiki.com/wiki/Apache2/SSL_and_Name_Based_Virtual_Hosts
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


--
Regards,
Quân

Y!IM: ng_hquan_vn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Make UCI support for other software?

2012-08-02 Thread Nguyễn Hồng Quân

Hello

To make a software use UCI for configuration instead of its own config, 
what do we have to do? Do we change in that software source code or UCI 
source code?


For example, I want to make UCI setting for WifiDog.

Also, is there documentation about using C API of libuci? I searched but 
found no one.


Thanks.

--
Regards,
Quân

Y!IM: ng_hquan_vn

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Build WifiDog against OpenWrt Backfire?

2012-07-25 Thread Nguyễn Hồng Quân

Hello,
I'm trying to build ipkg package of WifiDog from source, based on the 
tutorial http://dev.wifidog.org/wiki/doc/install/gateway

but the command
make ipk
does not work. It said that ipk rule does not exist.
So, how can I build it?

The WifiDog author has stopped working on building WifiDog for long time 
so he cannot help me. I think OpenWrt package maintainers successfully 
build it. So hope you can help.


--
Regards,
Quân

Y!IM: ng_hquan_vn

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Build WifiDog against OpenWrt Backfire?

2012-07-25 Thread Nguyễn Hồng Quân

Thank for your reply

On Wed 25 Jul 2012 03:59:51 PM ICT, Christoph Thielecke wrote:

Hello,

Already packaged :)

Yes, but because I want to make some change in the source, so I have to 
rebuild it.



Use this dir inside packages dir on backfire:
https://dev.openwrt.org/browser/packages/net/wifidog


With best regards

Christoph


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


--
Regards,
Quân

Y!IM: ng_hquan_vn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Captive Portal with OAuth support?

2012-07-01 Thread Nguyễn Hồng Quân
Thanks Bastian,
I want to try your kalua.
How to build it? Is it run on OpwnWrt Backfire or Kamikaze?

On 06/30/2012 01:43 AM, Bastian Bittorf wrote:
 Is there anyone in this mailing list tried with this idea? Which
 should
 I start from?
 we have this included since a long time:
 https://github.com/bittorf/kalua

 a good starting point is:
 https://github.com/livibetter/bash-oauth/blob/master/OAuth.sh

 bye, bastian.

-- 
Regards,
Quân

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Captive Portal with OAuth support?

2012-07-01 Thread Nguyễn Hồng Quân
Sorry, I found the instruction.
Is there a pre-built binary package of kalua?

On Mon 02 Jul 2012 11:10:23 AM ICT, Nguyễn Hồng Quân wrote:
 Thanks Bastian,
 I want to try your kalua.
 How to build it? Is it run on OpwnWrt Backfire or Kamikaze?

 On 06/30/2012 01:43 AM, Bastian Bittorf wrote:
 Is there anyone in this mailing list tried with this idea? Which
 should
 I start from?
 we have this included since a long time:
 https://github.com/bittorf/kalua

 a good starting point is:
 https://github.com/livibetter/bash-oauth/blob/master/OAuth.sh

 bye, bastian.


--
Regards,
Quân
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Captive Portal with OAuth support?

2012-06-27 Thread Nguyễn Hồng Quân
I'm about to implement Captive Portal with OAuth support for OpenWrt.
Is there anyone in this mailing list tried with this idea? Which should
I start from?
I just begin and I'm trying with WifiDog, but have problem when
installing AuthPuppy.
Do you think which webserver should be installed to use with AuthPuppy?
I tried Apache but cannot enable mod_rewrite.
I'm trying with Lightttpd but always get 404 error if change document
root to others than the default /www.
Any advise?

-- 
Regards,
Quân

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel