[OpenWrt-Devel] Chaos Calmer USB issue

2015-06-21 Thread Angelo Corsaro

Hi all,
I got the latest version from trunck and I compiled a subset of sw.
I coming from 14.07 ver and I would upgrade to the latest version: once 
complied and installed I found an issue in the USB section: the modem 
cannot detect an old pstn modem connected to the usb port.
Here I report the lsusb command from both versions (14.07 and 15.05): 
now I reverted to barrier breaker waiting for a fix ;)


BusyBox v1.22.1 (2015-06-13 11:22:11 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

   || W I R E L E S S F R E E D O M

   -
   BARRIER BREAKER (Barrier Breaker, r45951
   https://dev.openwrt.org/changeset/45951)
   -

 * 1/2 oz Galliano Pour all ingredients into
 * 4 oz cold Coffee an irish coffee mug filled
 * 1 1/2 oz Dark Rum with crushed ice. Stir.
 * 2 tsp. Creme de Cacao

   -

root@ARV7510PW22:~# lsusb
Bus 003 Device 002: ID 0572:1329 Conexant Systems (Rockwell), Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@ARV7510PW22:~# opkg list-installed | grep usb
kmod-ledtrig-usbdev - 3.10.49-1
kmod-usb-core - 3.10.49-1
kmod-usb-ohci - 3.10.49-1
kmod-usb-printer - 3.10.49-1
kmod-usb-serial - 3.10.49-1
kmod-usb-storage - 3.10.49-1
kmod-usb-storage-extras - 3.10.49-1
kmod-usb-uhci - 3.10.49-1
kmod-usb2 - 3.10.49-1
kmod-usb2-pci - 3.10.49-1
libusb-1.0 - 1.0.9-1
usbreset - 4
usbutils - 007-1

BusyBox v1.23.2 (2015-06-19 09:49:32 CEST) built-in shell (ash)

   || W I R E L E S S F R E E D O M

   -
   CHAOS CALMER (Chaos Calmer, r46060
   https://dev.openwrt.org/changeset/46060)
   -

 * 1 1/2 oz Gin Shake with a glassful
 * 1/4 oz Triple Sec of broken ice and pour
 * 3/4 oz Lime Juice unstrained into a goblet.
 * 1 1/2 oz Orange Juice
 * 1 tsp. Grenadine Syrup

   -

root@ARV7510PW22:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@ARV7510PW22:~# opkg list-installed | grep usb
kmod-ledtrig-usbdev - 3.18.16-1
kmod-usb-core - 3.18.16-1
kmod-usb-hid - 3.18.16-1
kmod-usb-ohci - 3.18.16-1
kmod-usb-ohci-pci - 3.18.16-1
kmod-usb-printer - 3.18.16-1
kmod-usb-serial - 3.18.16-1
kmod-usb-storage - 3.18.16-1
kmod-usb-storage-extras - 3.18.16-1
kmod-usb-uhci - 3.18.16-1
kmod-usb2 - 3.18.16-1
libusb-1.0 - 1.0.19-1
usbreset - 4
usbutils - 007-1

I have no error in the compiling and during the boot. I can report here 
the dmesg or any other info to fix this issue.

I opened also a ticket on https://dev.openwrt.org/ticket/19957

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


Re: [OpenWrt-Devel] openwrt-devel Digest, Vol 113, Issue 43

2015-05-18 Thread Angelo Corsaro

Hi Lars,
here's my conf:

/etc/config/firewall

config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option proto 'tcp'
option src_dport '22'
option dest_port '22'
option name 'ssh'
option dest_ip '192.168.100.200'
option reflection_src 'external'
option reflection '0'

config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option dest_ip '192.168.100.200'
option dest_port '80'
option name 'Photo'
option src_dport '10080'
option proto 'tcp'
option reflection '0'

config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option drop_invalid '1'

config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option masq '1'
option network 'lan'

config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option mtu_fix '1'
option network 'wan wan6'

config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'

config include
option path '/etc/firewall.user'

config rule
option target 'ACCEPT'
option src 'wan'
option dest_port '1022'
option name 'ssh_modem'
option proto 'tcp'

config forwarding
option dest 'wan'
option src 'lan'


/etc/firewall.user

# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.

# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.

iptables -t nat -D zone_lan_postrouting -j MASQUERADE
iptables -t nat -A zone_lan_postrouting -j MASQUERADE -o pppoa-wan


On 16/05/2015 12:00, openwrt-devel-requ...@lists.openwrt.org wrote:

--

Message: 5
Date: Sat, 16 May 2015 01:27:38 +0200
From: Lars Kruseli...@sumpfralle.de
To:openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] External (public) IP forwarded to
internal LAN [SOLVED]
Message-ID:20150516012738.7c28d...@erker.lan
Content-Type: text/plain; charset=US-ASCII

Hi Angelo,


[..]
Doest this is an error or normal behaviour  of fw3 ?

Could you add the network and the firewall configuration files?

Lars


--

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


Re: [OpenWrt-Devel] External (public) IP forwarded to internal LAN [SOLVED]

2015-05-15 Thread Angelo Corsaro


Hi Lars,
following your directions I played with the buttons, options but I 
haven't found the solution.
I left the checkbutton MASQUERADE only for the internal lan, but always 
I haven't the right  behaviour.


On 15/05/2015 00:45, openwrt-devel-requ...@lists.openwrt.org wrote:

Here is the lan postrouting taken from the above:

Chain zone_lan_postrouting (1 references)
  pkts bytes target prot opt in out source destination
12 860  postrouting_lan_rule  all  --  * * 0.0.0.0/0 0.0.0.0/0
12 860  MASQUERADEall  --  * * 0.0.0.0/0 0.0.0.0/0

The last line should be the problem: every packet heading for the lan zone
(e.g. your webserver) will be masqueraded (SNAT).
Maybe you enabled the masquerading checkbox in the firewall config for this
interface?

The content of /etc/config/firewall would probably show the root cause (in case
my above guess is wrong).

cheers,
lars




Checking another firewall script, I found an interesting rule:

Chain POSTROUTING (policy ACCEPT 98070 packets, 12M bytes)
 pkts bytes target prot opt in out source destination
 215K   17M MASQUERADE  all  --  * *eth1* 0.0.0.0/00.0.0.0/0

so all address are masquerade only for the destination eth1.

So I issued
iptables -t nat -D zone_lan_postrouting -j MASQUERADE
iptables -t nat -A zone_lan_postrouting -j MASQUERADE -o pppoa-wan

and my webserver is logging the source address.

Doest this is an error or normal behaviour  of fw3 ?

Cheers
Angelo

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


Re: [OpenWrt-Devel] External (public) IP forwarded to internal LAN

2015-05-14 Thread Angelo Corsaro

Hi,
I'll try to explain better my concern.
I would like to show the source ip when I read the log of my web 
browser; this is the scenario:


user A (IP) ---//- (extern iface)MODEM/ROUTER(internal iface) 
-- (WWW iface) WWW


the IP is 1.2.3.4
the extern iface is 5.6.7.8
the internal iface is 192.168.100.100
the WWW iface is 192.168.100.200

when I look the ip packets  on extern iface I can see the packet from 
1.2.3.4 and directed to 5.6.7.8, BUT on internal iface every packet 
comes from 192.168.100.100, not from 1.2.3.4.

in the log of the web server the address recorded is 192.168.100.100.

the dump on the modem's extern iface
  15:07:09.216062 IP 1-2-3-4.foo.com.15716  adsl-5-6-7-8.foo.it.10080
the dump on the modem's internal iface
  15:07:03.135591 IP 192.168.100.100.15716  192.168.100.200.www
on the www side
192.168.100.100 - - [14/May/2015:15:07:03 +0200] GET / HTTP/1.1 200 
2735 - Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) 
Gecko/20100101 Firefox/38.0


you can find the output of the two commands on pastebin in the next 2 weeks.

iptables -L -vn at http://pastebin.com/2b0ewSyu
iptables -t nat -L -vn at http://pastebin.com/i7qPXEMJ

Hope this helps.

Cheers
Angelo


Hi all,
first of all, I'm sorry for my poor english and if I placed my 
question in a wrong place.
I'm facing an issue with,I think, iptables. This is the scenario: I'm 
using a ddns service to point my external ip to access my server; and 
it works fine, but the original address is always  the internal iface 
of my modem.


This is my actual port-forwarding conf in /etc/config/firewall 
option src 'wan'

option dest 'lan'
option proto 'tcp udp'
option dest_ip '192.168.x.x'
option dest_port 'x'
option name 'Photo'
option src_dport 'x'
option reflection '1'


surfing on web and in the wiki of openwrt I cannot find any solution.
If I'm not wrong, in the previous release of openwrt the origin's IP 
was forwarded to the internal lan.
Tcpdumping the wan iface I can see both public ip (original and my own 
ip)


Is there any solution (conf, recompile the packet,patch etc) to 
reflect the previous behaviour ?


Cheers
Angelo

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


[OpenWrt-Devel] External (public) IP forwarded to internal LAN

2015-05-13 Thread Angelo Corsaro

Hi all,
first of all, I'm sorry for my poor english and if I placed my question 
in a wrong place.
I'm facing an issue with,I think, iptables. This is the scenario: I'm 
using a ddns service to point my external ip to access my server; and it 
works fine, but the original address is always  the internal iface of my 
modem.


This is my actual port-forwarding conf in /etc/config/firewall

config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option proto 'tcp udp'
option dest_ip '192.168.x.x'
option dest_port 'x'
option name 'Photo'
option src_dport 'x'
option reflection '1'


surfing on web and in the wiki of openwrt I cannot find any solution.
If I'm not wrong, in the previous release of openwrt the origin's IP was 
forwarded to the internal lan.

Tcpdumping the wan iface I can see both public ip (original and my own ip)

Is there any solution (conf, recompile the packet,patch etc) to reflect 
the previous behaviour ?


Cheers
Angelo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel