Results 1 to 3 of 3

Thread: Problems forwarding traffic between 2 interfaces on same device .

  1. #1
    Join Date
    2014-Mar
    Posts
    163

    Problems forwarding traffic between 2 interfaces on same device .

    Hi everyone , i am doing here a project with my RPI , and i have some issues on forwarding traffic between 2 interfaces on my raspberry .

    The main Objective is this one :


    This will work like this :

    - Rpi using Wireless card will get internet from one of the wireless routers
    - RPI will forward traffic from eth0 to wlan0 and vice-versa
    -RPI will act as a dhcp router
    -Connected to ETH0 port of RPI will be a network switch


    What did i installed so far :
    -isc-dhcp-server

    Status of the project :

    - RPI is delivering dhcp leases on lan
    - RPI is retrieving internet from wifi routers


    What is not working :
    -Clients connected to switch dont have internet access

    Configurations made so far on RPI :

    /etc/dhcp/dhcpd.conf

    subnet 10.5.5.0 netmask 255.255.255.224 {
    range 10.5.5.26 10.5.5.30;
    option routers 10.5.5.1;
    option broadcast-address 10.5.5.31;
    option domain-name-servers 10.5.5.1;
    default-lease-time 600;
    max-lease-time 7200;
    }
    RPI is using static Ip address :
    /etc/network/interfaces
    iface eth0 inet static
    address 10.5.5.1
    netmask 255.255.255.224
    gateway 10.5.5.0
    -Sysctl.conf have forward ipv4 rule activated .
    -no iptables installed


    /etc/default/isc-dhcp-server

    is listening on eth0 interface
    Anyone have an idea why i cant get packet forward on eth0 to wlan0 ?
    Last edited by pedropt; 2015-11-29 at 23:19.

  2. #2
    Join Date
    2014-Mar
    Posts
    163
    Problem Solved .
    Solution was to remove ics-dhcp-server and installing dnsmasq in its place .
    Configuring dnsmasq to deliver dhcp leases over eth0 .

    Was not working due some possible conflict between ics-dhcp-server and dnsmasq .
    iptables was also installed using these temporary rules :

    *nat
    :PREROUTING ACCEPT [0:0]
    :INPUT ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    :POSTROUTING ACCEPT [0:0]
    -A POSTROUTING -o wlan0 -j MASQUERADE
    COMMIT
    # Completed on Mon Nov 30 18:32:42 2015
    # Generated by iptables-save v1.4.21 on Mon Nov 30 18:32:42 2015
    *filter
    :INPUT ACCEPT [117:8424]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [70:11696]
    -A FORWARD -i eth0 -o wlan0 -j ACCEPT
    -A FORWARD -i wlan0 -o eth0 -j ACCEPT
    COMMIT
    Tips taken from this link in ubuntu , however , the example they were giving was the inverse i was doing here , so i had to change the interfaces in configuration .
    No hostapd was installed because i was not providing an Access point .
    http://ubuntuforums.org/showthread.php?t=2184949

    and also some tips taken from this link from RPI Website :
    http://raspberrypihq.com/how-to-turn...a-wifi-router/
    Last edited by pedropt; 2015-11-30 at 18:59.

  3. #3
    Join Date
    2015-Jul
    Location
    /home/duxim
    Posts
    408
    Good work!
    thanks for idea and solution
    Repetitio est mater studiorum

Similar Threads

  1. Replies: 1
    Last Post: 2022-08-15, 22:34
  2. Replies: 0
    Last Post: 2013-10-17, 04:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •