Wireless setup



  • @Lazar-Demin Just finished setting up the posting by @Haoran-Li
    "Using the Omega as a WiFi Ethernet Bridge" but could not get connectivity via the ethernet port on the omega.
    Wireless signal from Local router-->Omega receiving wireless signal --
    -->Ethernet connection on omega has laptop connected and setup for DHCP. No traffic. Here are the files I configured as per write up.

    br-lan    Link encap:Ethernet  HWaddr 40:A3:6B:C1:17:0B
              inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
              inet6 addr: fe80::42a3:6bff:fec1:170b/64 Scope:Link
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:751 errors:0 dropped:0 overruns:0 frame:0
              TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:88965 (86.8 KiB)  TX bytes:7642 (7.4 KiB)
    
    eth0      Link encap:Ethernet  HWaddr 40:A3:6B:C1:17:0B
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:812 errors:0 dropped:0 overruns:0 frame:0
              TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:104163 (101.7 KiB)  TX bytes:2990 (2.9 KiB)
              Interrupt:4
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:16 errors:0 dropped:0 overruns:0 frame:0
              TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1621 (1.5 KiB)  TX bytes:1621 (1.5 KiB)
    
    wlan0     Link encap:Ethernet  HWaddr 40:A3:6B:C1:17:0C
              inet addr:192.168.1.119  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::42a3:6bff:fec1:170c/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:24475 errors:0 dropped:0 overruns:0 frame:0
              TX packets:15448 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:3508079 (3.3 MiB)  TX bytes:1979404 (1.8 MiB)
    
    wlan0-1   Link encap:Ethernet  HWaddr 42:A3:6B:C1:17:0C
              inet6 addr: fe80::40a3:6bff:fec1:170c/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:4095 (3.9 KiB)
    		  
    cat network
    config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
    
    ```#config globals 'globals'
    #   option ula_prefix 'fd28:1f13:5b38::/48'
    
    config interface 'lan'
       option ifname 'eth0'
       option type 'bridge'
       option proto 'static'
       option ipaddr '192.168.3.1'
       option netmask '255.255.255.0'
       option ip6assign '60'
    
    #config interface 'wan'
    #   option ifname 'eth0'
    #   option proto 'dhcp'
    
    #config interface 'wan6'
    #   option ifname '@wan'
    #   option proto 'dhcpv6'
    
    #config switch
    #   option name 'switch0'
    #   option reset '1'
    #   option enable_vlan '1'
    
    #config switch_vlan
    #   option device 'switch0'
    #   option vlan '1'
    #   option ports '0 1 3'
    
    config interface 'wwan'
        option proto 'dhcp'
        option hostname 'OnionOmega'
    
    #config interface 'wlan'
    #    option proto 'static'
    #    option ipaddr '192.168.3.1'
    #    option netmask '255.255.255.0'
    
    
    #config interface 'wlan'
    #   option ifname 'wlan0-1 wlan0'
    #   option type 'bridge'
    #   option proto 'static'
    #   option ipaddr '192.168.3.1'
    #   option netmask '255.255.255.0'
    #   option ip6assign '60'
    
     cat firewall
    config defaults
        option syn_flood    1
        option input        ACCEPT
        option output       ACCEPT
        option forward      REJECT
    # Uncomment this line to disable ipv6 rules
        option disable_ipv6 1
    
    config zone
        option name     lan
        list   network      'wlan'
        list   network      'lan'
        option input        ACCEPT
        option output       ACCEPT
        option forward      ACCEPT
    
    config zone
        option name     wan
        list   network      'wwan'
        #list   network     'wan6'
        option input        ACCEPT
        option output       ACCEPT
        option forward      REJECT
        option masq     1
        option mtu_fix      1
    
    config forwarding
        option src      lan
        option dest     wan
    
    # We need to accept udp packets on port 68,
    # see https://dev.openwrt.org/ticket/4108
    config rule
        option name     Allow-DHCP-Renew
        option src      wan
        option proto        udp
        option dest_port    68
        option target       ACCEPT
        option family       ipv4
    
    # Allow IPv4 ping
    config rule
        option name     Allow-Ping
        option src      wan
        option proto        icmp
        option icmp_type    echo-request
        option family       ipv4
        option target       ACCEPT
    
    # Allow DHCPv6 replies
    # see https://dev.openwrt.org/ticket/10381
    config rule
        option name     Allow-DHCPv6
        option src      wan
        option proto        udp
        option src_ip       fe80::/10
        option src_port     547
        option dest_ip      fe80::/10
        option dest_port    546
        option family       ipv6
        option target       ACCEPT
    
    # Allow essential incoming IPv6 ICMP traffic
    config rule
        option name     Allow-ICMPv6-Input
        option src      wan
        option proto    icmp
        list icmp_type      echo-request
        list icmp_type      echo-reply
        list icmp_type      destination-unreachable
        list icmp_type      packet-too-big
        list icmp_type      time-exceeded
        list icmp_type      bad-header
        list icmp_type      unknown-header-type
        list icmp_type      router-solicitation
        list icmp_type      neighbour-solicitation
        list icmp_type      router-advertisement
        list icmp_type      neighbour-advertisement
        option limit        1000/sec
        option family       ipv6
        option target       ACCEPT
    
    # Allow essential forwarded IPv6 ICMP traffic
    config rule
        option name     Allow-ICMPv6-Forward
        option src      wan
        option dest     *
        option proto        icmp
        list icmp_type      echo-request
        list icmp_type      echo-reply
        list icmp_type      destination-unreachable
        list icmp_type      packet-too-big
        list icmp_type      time-exceeded
        list icmp_type      bad-header
        list icmp_type      unknown-header-type
        option limit        1000/sec
        option family       ipv6
        option target       ACCEPT
    
    # include a file with users custom iptables rules
    config include
        option path /etc/firewall.user
    
    
    ### EXAMPLE CONFIG SECTIONS
    # do not allow a specific ip to access wan
    #config rule
    #   option src      lan
    #   option src_ip   192.168.45.2
    #   option dest     wan
    #   option proto    tcp
    #   option target   REJECT
    
    # block a specific mac on wan
    #config rule
    #   option dest     wan
    #   option src_mac  00:11:22:33:44:66
    #   option target   REJECT
    
    # block incoming ICMP traffic on a zone
    #config rule
    #   option src      lan
    #   option proto    ICMP
    #   option target   DROP
    
    # port redirect port coming in on wan to lan
    #config redirect
    #   option src          wan
    #   option src_dport    80
    #   option dest         lan
    #   option dest_ip      192.168.16.235
    #   option dest_port    80
    #   option proto        tcp
    
    # port redirect of remapped ssh port (22001) on wan
    #config redirect
    #   option src      wan
    #   option src_dport    22001
    #   option dest     lan
    #   option dest_port    22
    #   option proto        tcp
    
    # allow IPsec/ESP and ISAKMP passthrough
    #config rule
    #   option src      wan
    #   option dest     lan
    #   option protocol     esp
    #   option target       ACCEPT
    
    #config rule
    #   option src      wan
    #   option dest     lan
    #   option src_port     500
    #   option dest_port    500
    #   option proto        udp
    #   option target       ACCEPT
    
    ### FULL CONFIG SECTIONS
    #config rule
    #   option src      lan
    #   option src_ip   192.168.45.2
    #   option src_mac  00:11:22:33:44:55
    #   option src_port 80
    #   option dest     wan
    #   option dest_ip  194.25.2.129
    #   option dest_port    120
    #   option proto    tcp
    #   option target   REJECT
    
    #config redirect
    #   option src      lan
    #   option src_ip   192.168.45.2
    #   option src_mac  00:11:22:33:44:55
    #   option src_port     1024
    #   option src_dport    80
    #   option dest_ip  194.25.2.129
    #   option dest_port    120
    #   option proto    tcp


  • @Lazar-Demin When finished with the "Using-Omega-As_WiFi-Ethernet-Bridge" will it function as shown? Failed on my first configuration attempt. Attempting a second setup but wanted to show what my configurations look like (show above this post) and convey my expectations. Sounds like it is getting closer.
    LaptopAndBridge2.png



  • @Nayan Sorry for the delay have been trying to get this working. Answering your question no devices can not see the internet.


  • administrators

    @Guest In the post with all of the configuration files, can you please edit the post to format the settings with code syntax? It's incredibly hard to read with the current formatting.
    There's a guide here: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code

    I'll ask @Haoran-Li to take a look, meanwhile you should experiment as well, we definitely welcome innovation in the community



  • @Lazar-Demin Think I figured it out let me know if it needs anymore editing.


  • administrators

    @Guest very legible now, thanks!



  • @Guest... Just curious whether you were able to get it working finally... ?



  • @Nayan Still reviewing my files and attempting to get it working. In case there was a problem with the cables or laptop used a different set of components still fails. Can you see from the information posted if I have miss-configured anything called out in your tutorial? Have you successfully had this work on your end?
    Will go over the steps you call out again and see if there is something I am missing.



  • @Nayan read your step by step instructions and took some notes following each step and checking it off but still could not get it to work could you review my steps and see where I am going wrong?

    Step 1: Connect Omega with WiFi
    Pretty straight forward using the gui for this setup portion.
    Step 2: Enable the Ethernet Connection in Omega
    Basically what we need to do is to uncomment the following part licated at /etc/config/network:

    config interface 'lan'
    	option ifname 'eth0'
    	option type 'bridge'
    	option proto 'static'
    	option ipaddr '192.168.3.1'
    	option netmask '255.255.255.0'
    	option ip6assign '60'
    

    Step 3: Connect the Two Interfaces via Firewall Configuration
    There is another tutorial (as I said), click here.
    This tutorial is how to make Omega as a router.
    The theory is the same, all we need to do is to convert
    what is going on in the tutorial.
    Step 3a: Turning the Omega Into a WiFi Router
    Open up the /etc/config/network file, and add the following line at the end of the file:

    config interface 'wan' 
    	option ifname 'eth0' 
    	option proto 'dhcp'   
    	option hostname 'OnionOmega'
    

    Then restart netowrk /etc/init.d/network restart
    Step 3b: Step 4: Configuring the WiFi Settings
    Next, you will need to open up the /etc/config/wireless file and configure two things.
    First, you should disable the WiFi network that the Omega is currently connected to.
    You can do this by deleting or commenting out a block that looks something like the following:

     config wifi-iface
    	option device 'radio0'
    	option mode 'sta'
    	option network 'wwan'
    	option ssid 'WiFi Network'
    	option encryption 'psk2'
    	option key 'TopSecret'
    	option disabled '0'
    

    Next, you might want to configure the WiFi network that the Omega will be serving.
    You can do this by editing the following block:
    Within this block, you can change the SSID of your Omega,
    as well as the type of encryption you want to use for the router.
    NOTE CHECK ON ENCRYPTION USED ON LAN COMPARE TO ENCRPTION SET ON OMEGA

        config wifi-iface
    	option device 'radio0'
    	option network 'wlan'
    	option mode 'ap'
    	option encryption 'psk2'
    	option ssid 'OmegaRouter'
    	option key 'RouterPassword'
    

    Once you have finished customizing the WiFi network, simply save and close the file,
    and run the following command to restart the WiFi network:
    wifi
    Step 3C: Enabling Packet Routing

    Next, you will need to open up the /etc/config/wireless file and configure two things.
    First, you should disable the WiFi network that the Omega is currently connected to.
    You can do this by deleting or commenting out a block that looks something like the following:

    config wifi-iface
    	option device 'radio0'
    	option mode 'sta'
    	option network 'wwan'
    	option ssid 'WiFi Network'
    	option encryption 'psk2'
    	option key 'TopSecret'
    	option disabled '0
    

    'Next, you might want to configure the WiFi network that the Omega will be serving.
    You can do this by editing the following block:
    Within this block, you can change the SSID of your Omega,
    as well as the type of encryption you want to use for the router.
    NOTE CHECK ON ENCRYPTION USED ON LAN COMPARE TO ENCRYPTION SET ON OMEGA <---my comment

    config wifi-iface
    	option device 'radio0'
    	option network 'wlan'
    	option mode 'ap'
    	option encryption 'psk2'
    	option ssid 'OmegaRouter'
    	option key 'RouterPassword'
    

    Once you have finished customizing the WiFi network, simply save and close the file,
    and run the following command to restart the WiFi network:

    wifi	
    

    Step 3C: Enabling Packet Routing
    Next, you will need to configure the Omega to route packets from the ethernet interface
    (eth0) to your WiFi interface (wlan0). To do this, you will be editing the /etc/config/firewall file:
    find the the block that looks something like the following:

    config zone
    	option name     		wan
    	list   network      'wwan'
    	#list   network     'wan6'
    	option input        ACCEPT
    	option output       ACCEPT
    	option forward      ACCEPT
    	option masq     1
    	option mtu_fix      1
    

    and add the following line:

    list   network      'wan'
    

    What you will end up with is something like the following:

    config zone
    	option name     		wan
    	list   network      	'wwan'
    	list   network      	'wan'
    	#list  network     		'wan6'
    	option input        	ACCEPT
    	option output       	ACCEPT
    	option forward      	ACCEPT
    	option masq     		1
    	option mtu_fix      	1
    

    What this tells the Omega to do is to add the wan network
    (which we defined in /etc/config/network file)
    to a firewall zone called wan.
    This zone has already been setup to route packets to another firewall zone
    called lan, which contains the wlan0 interface.

    Once you have saved and closed the file, run the following command to restart the firewall with the
    updated configuration:

    /etc/init.d/firewall restart
    

    Once we understand what is going on, we can modify the file. What we are actually doing is to add a single line
    of configuration under zone lan.

    list   network      `lan`
    

    list means access list, you can get the information through Openwrt Firewall configuration page.

    Now, the configuration looks like this:

    config zone
    	option name     lan
    	list   network      'wlan'
    	list   network      'lan'
    	option input        ACCEPT
    	option output       ACCEPT
    	option forward      ACCEPT
    

    Now we need to restart the service, by doing /etc/init.d/firewall restart and /etc/init.d/network restart
    (firewall goes first), or simply reboot Omega.
    Step 4: Connect to Lan Switch via Ethernet
    Since we configured all the things, and restarted the service, now we should be able to connect with other
    devices via ethernet. Unfortunately, Onion does not provide an tutorial about how to connect my laptop to Omega.

    Make sure that your connection is set to Obtain IP address and DNS address Automatically. It should be set so by default.

    Using this Setup
    If you have a device that only can be connected via Ethernet and you only have WiFi available, you could apply this tutorial to make it work!


  • administrators

    @Guest erm... is this just the tutorial from https://wiki.onion.io/Tutorials/Using-Omega-As-Wifi-Ethernet-Bridge pasted into the forum???



  • It is actually the combination of two tutorials showing the steps taken to achieve the end result. Posted in an effort to share with @Nayan my exact steps taken as well as using it during my setup as a check off sheet. When carrying out the tutorial it was helpful to see the actual steps rather then links to other steps. As of now have not successfully completed this setup configuration and @Nayan might find it useful to trace my steps and see why it has failed.



  • Hi @Guest

    Could you also post the complete contents of your '/etc/config/network' file here?



  • config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
    
    #config globals 'globals'
    #   option ula_prefix 'fd28:1f13:5b38::/48'
    
    config interface 'lan'
       option ifname 'eth0'
       option type 'bridge'
       option proto 'static'
       option ipaddr '192.168.3.1'
       option netmask '255.255.255.0'
       option ip6assign '60'
    
    config interface 'wan'
       option ifname 'eth0'
       option proto 'dhcp'
       option hostname 'OnionOmega'
    
    #config interface 'wan6'
    #   option ifname '@wan'
    #   option proto 'dhcpv6'
    
    #config switch
    #   option name 'switch0'
    #   option reset '1'
    #   option enable_vlan '1'
    
    #config switch_vlan
    #   option device 'switch0'
    #   option vlan '1'
    #   option ports '0 1 3'
    
    config interface 'wwan'
        option proto 'dhcp'
        option hostname 'OnionOmega'
    
    #config interface 'wlan'
    #    option proto 'static'
    #    option ipaddr '192.168.3.1'
    #    option netmask '255.255.255.0'
    
    
    #config interface 'wlan'
    #   option ifname 'wlan0-1 wlan0'
    #   option type 'bridge'
    #   option proto 'static'
    #   option ipaddr '192.168.3.1'
    #   option netmask '255.255.255.0'
    #   option ip6assign '60'


  • @Nayan here are the contents of my wireless config file:

            option type 'mac80211'
            option hwmode '11g'
            option path 'platform/ar933x_wmac'
            option htmode 'HT20'
            option disabled '0'
            option channel '9'
            option txpower '30'
            option country 'US'
    
    config wifi-iface
            option device 'radio0'
            option network 'wlan'         <----you want me to change this from wlan to wan?
            option mode 'ap'
            option ssid 'Omega-19F3'
            option encryption 'psk2'
            option key 'key'
            option disabled '0'
    
    config wifi-iface
            option device 'radio0'
            option ssid 'home2'
            option encryption 'psk2'
            option network 'wwan'
            option mode 'sta'
            option key 'key'
            option disabled '0'
    
    And you want me to uninstall wpad-mini and installing wpad, correct?


  • Yes... Please try that



  • @Nayan ran opkg update, then ran opkg remove wpad-mini all ran fine but when I tried opkg install wpad got:

    root@Omega-xxxx:/# opkg remove wpad-mini
    Removing package wpad-mini from root...
    root@Omega-xxxx:/# opkg install wpad
    Unknown package 'wpad'.
    Collected errors:
     * opkg_install_cmd: Cannot install package wpad.


  • @Nayan did the opkg update it ran no problem then after the uninstall of wpad-mini and attempt to install wpad no longer had connection.
    Now when i run opkg update get a:

    Collected errors:
     * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/base/Packages.gz, wget returned 4.
     * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/base/Packages.sig, wget returned 4.
     * opkg_download: Failed to download http://repo.onion.io/omega/packages/Packages.gz, wget returned 4.
     * opkg_download: Failed to download http://repo.onion.io/omega/packages/Packages.sig, wget returned 4.
     * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/Packages.gz, wget returned 4.
     * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/Packages.sig, wget returned 4.
    

    When i run opkg update on my other Omega it runs fine?



  • For those wondering why this sounded incomplete including our discussion via chat.

    Guest a day ago
    Any word on the fail of bridge posted my network file for your review
    Nayan about 3 hours ago
    Hey Guest... sorry have been busy with something... Everything seems legit... I have one last thing you can try (cos it worked for me)... try installing wpad removing wpad-mini... though I do not know the exact circumstance for your network it certainly wont harm ur omega to have the full version of wpad... give it a shot and let me know... in the meantime let me see the config again...
    Nayan about 3 hours ago
    Hey guest... I just noticed something...in your '/etc/config/wireless' file just change the 'wlan' to 'wan' and let me know the results
    Nayan 27 minutes ago
    hi there Guest... yes please do those two things and see if it works
    Guest 22 minutes ago
    root@Omega-xxxx:/# opkg install wpad
    Unknown package 'wpad'.
    Collected errors:
    opkg_install_cmd: Cannot install package wpad.
    Nayan 12 minutes ago
    U need to uninstall the wpad-mini first
    do an ifconfig to check if you are connected to the internet first
    Nayan 4 minutes ago
    thats really strange...
    Guest 3 minutes ago
    Yup did uninstall wpad-mini before attempting to install wpad
    Nayan 3 minutes ago
    do you mind doing a factory reset?
    Guest 2 minutes ago
    will do and let you know
    Nayan 2 minutes ago
    had to do factory reset several times
    ok



  • This post is deleted!


  • @Nayan was curious so checked my other Omega with the most current firmware and here is what I got:

    wpad - 2015-03-25-1 - This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS Authenticator and Supplicant
    wpad-mesh - 2015-03-25-1 - This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (with 802.11s mesh and SAE support).
    wpad-mini - 2015-03-25-1 - This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (WPA-PSK only).
    

    It appears you don't have to download and install as they are already present just not sure if they all are loading concurrently?


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.