(Problem) Make Raspberry pi share internet via Ethernet

Raspberry Pi related support

(Problem) Make Raspberry pi share internet via Ethernet

Postby ub3rking » 26 May 2015, 07:18

Greetings,
I use Raspbian.
I come over here, I'm a beginner, and I would like to ask for help on an issue (draft) I'm doing.

Explained below:

First of all I have Raspbian in my Raspberry Pi, then I want to do is set this as a network node to monitor through "dumpcap" packets that pass through my network, I've done I installed everything necessary in fact I've already running great, I've done through a Wireless (USB) adapter from functioning as "Access Point" wireless (so will download the files to be saved), I've come this far following this tutorial: http://www.networkworld.com/article/222 ... -node.html and another pair.

The fact is that since I could configure all my peripherals, the problem lies in the following:

I need to connect from my local home router or from the Internet source (ADSL Modem), through an Ethernet cable to my Raspberry Pi (which work to record all packets My network traffic by "dumpcap") it is noteworthy that this will have perfectly configured, then I need through another Ethernet cable which my computer (PC) will be connected by a transformer USB-> Ethernet (attached reference picture), for example, that I have done and the only mistake that happens to me is that my PC does not receive Internet remains limited, in theory I need to do is that the Raspberry Pi function as a filter through which to capture packets of dumpcap store in some files (this is already done), but then the computer will connect by USB-port Ethernet continues to have internet and work perfectly as if connecting from the ADSL modem to the PC directly.

Could anyone help?

Thanks in advance.

-----------------

Deputy contents of the most usual configuration files so that any expert tell me if I have an error .

/etc/default/isc-dhcp-server

Code: Select all
# Defaults for isc-dhcp-server initscript
# sourced by /etc/init.d/isc-dhcp-server
# installed at /etc/default/isc-dhcp-server by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
DHCPD_CONF=/etc/dhcp/dhcpd.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
DHCPD_PID=/var/run/dhcpd.pid

# Additional options to start dhcpd with.
#       Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="wlan0 eth0 eth1"


/etc/dhcp/dhcpd.conf

Code: Select all
#...

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
#...

subnet 192.168.42.0 netmask 255.255.255.0 {
        range 192.168.42.10 192.168.42.50;
        option broadcast-address 192.168.42.255;
        option routers 192.168.42.1;
        default-lease-time 600;
        max-lease-time 7200;
}


/etc/network/interfaces

Code: Select all
auto lo
iface lo inet loopback

auto eth0
#iface eth0 inet dhcp
#iface lo inet loopback
iface eth0 inet static
address 192.168.42.2
netmask 255.255.255.0
#gateway 192.168.0.1

auto eth1
#iface eth1 inet static
#iface lo inet loopback
iface eth1 inet static
address 192.168.42.3
netmask 255.255.255.0
#gateway 192.168.0.1

auto wlan0
#allow-hotplug wlan0
iface wlan0 inet static
address 192.168.42.1
netmask 255.255.255.0

#auto wlan0
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

up iptables-restore < /etc/iptables.ipv4.nat


/etc/hostapd/hostapd.conf

Code: Select all
interface=wlan0
driver=rtl871xdrv
ssid=OggunLab
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Shabukenke01
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP


/etc/default/hostapd

Code: Select all
# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
DAEMON_CONF="/etc/hostapd/hostapd.conf"

# Additional daemon options to be appended to hostapd command:-
#       -d   show more debug messages (-dd for even more)
#       -K   include key data in debug messages
#       -t   include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#


----------------------

Image

Image
ub3rking
 
Posts: 1
Joined: 26 May 2015, 07:17

support RuneAudio Donate with PayPal

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 9 guests