blainemac
Posts: 3
Joined: Sat May 11, 2013 1:11 pm

Webserver/Static IP

Sat May 11, 2013 1:30 pm

Hey guys,

I set up a lamp server on my pi (Raspbian) and everything on that end is configured properly, but now i'm trying to set a static ip and i'm running into some issues.

Firstly, i'm sharing the wireless connection on my laptop (ubuntu) with my pi via ethernet cable.

I've tried a few different configurations of /etc/network/interfaces but i'm still unable to access the pi from the web.

Here is the ' ifconfig $$ netstat -r ' from both machines:

firstly the laptop:

inet addr:10.42.0.1 Bcast:10.42.0.255 Mask:255.255.255.0

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 192.168.99.1 0.0.0.0 UG 0 0 0 eth1
10.42.0.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth1
192.168.99.0 * 255.255.255.0 U 0 0 0 eth1


then the pi:

inet addr:10.42.0.125 Bcast:10.42.0.255 Mask:255.255.255.0

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.42.0.1 0.0.0.0 UG 0 0 0 eth0
10.42.0.0 * 255.255.255.0 U 0 0 0 eth0


This is the setting after I already tried to set my static ip to 10.42.0.125. I was unable to access the pi @ this ip from anything except the laptop it's directly connected to.

This might be a silly thing, but I could use some help

Thanks!

sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am
Contact: Website

Re: Webserver/Static IP

Sat May 11, 2013 1:53 pm

blainemac wrote:Hey guys,
Firstly, i'm sharing the wireless connection on my laptop (ubuntu) with my pi via ethernet cable.
You need an auto-sensing NIC on the laptop (Gigabit is auto-sensing bydefault, not all 10/100M are) or a cross-over cable to talk directly to the RasPi.

Do you have an ethernet switch or hub?
I've tried a few different configurations of /etc/network/interfaces but i'm still unable to access the pi from the web.
The RasPi is NAT-ed by the laptop which is NAT-ed by your wireless interface (which may be NAT-ed again by your ISP).

Getting to the RasPi from the internet is going to be rather non-trivial.

blainemac
Posts: 3
Joined: Sat May 11, 2013 1:11 pm

Re: Webserver/Static IP

Sat May 11, 2013 2:45 pm

Yeah im having no trouble communicating between the pi and laptop, i just can't find the pi from anywhere else. Is it just because im accessing the connection through the laptop?

I have a wireless modem but its on my first floor and the pi is on the 2nd floor. I had a dlink wifi dongle but its broken and causes my pi to freeze. So thats why i resorted to using my laptop as a wireless card essentially.

Would I have an easier time if the pi could access the wifi directly?

Return to “Networking and servers”