Page 7 of 7
Re: I can connect the devices, but not the Internet
Posted: Sun 03 May 2015, 17:26
by gyro
MyPuppysaysWauWau wrote:iptables v1.4.12: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
You probably need to "insmod" one or more of the nat modules in "kernel/net/ipv4/netfilter"
Edit:
Might be better to use "modprobe" instead of "insmod".
Edit2:
Try "modprobe -v iptable_nat"
gyro
Re: I can connect the devices, but not the Internet
Posted: Tue 05 May 2015, 06:33
by MyPuppysaysWauWau
gyro wrote:
Try "modprobe -v iptable_nat"
gyro
Thx
But I got the message: "FATAL: Module iptable_nat not found"
Re: I can connect the devices, but not the Internet
Posted: Tue 05 May 2015, 12:59
by gyro
MyPuppysaysWauWau wrote:But I got the message: "FATAL: Module iptable_nat not found"
Yep, the kernel modules in precise 5.7.1 are rather different than those in tahrpup 6.0.2.
But it's worse, i couldn't find any nat module at all. Then I found a possible explanation, the configuration file for the kernel compile conatins the following line:
This means that nat support is not compiled into the kernel.
So looks like no go without a kernel compile.
gyro
Posted: Tue 05 May 2015, 13:29
by MyPuppysaysWauWau
Gyro, I don't need Wifi often... only for upgrading my Tablet, or for a new app. Shall I make a dual boot with tahrpup? What do you think?
If yes, which "extras" do I need for a wifi routing e.g. ap-hotspot?
download Slacko 5.6-4G
Posted: Tue 05 May 2015, 15:46
by gyro
Posted: Tue 05 May 2015, 16:09
by watchdog
Posted: Tue 05 May 2015, 16:26
by gyro
MyPuppysaysWauWau wrote:Gyro, I don't need Wifi often... only for upgrading my Tablet, or for a new app. Shall I make a dual boot with tahrpup? What do you think?
If yes, which "extras" do I need for a wifi routing e.g. ap-hotspot?
I have no idea if Shareinternet will work in Tahrpup 6.0.2, and I don't have a hardware setup to test it.
But even if it did work it only does the router bit, it won't create a wi-fi access point. You would have to use it in conjunction with something like hostapd,
http://www.murga-linux.com/puppy/viewtopic.php?t=87584. And again, I have not tried to do this.
It might be an idea to try ap-hotspot with a frugal install of Tahrpup 6.0.2 without Shareinternet. ap-hotspot + hostapd is supposed to do the whole thing.
gyro
Posted: Wed 13 May 2015, 07:08
by Bindee
* removed *
Posted: Thu 14 May 2015, 08:32
by gyro
Bindee wrote:These run a version of Debian so i don't know if you could run Puppy Router on it ?
Why would you bother?
You buy a little router box, it works, just use it.
When I wrote this script, I used it on an eeePC to provide Internet to 2 laptops when traveling.
These days, when traveling, I use a cell based "Pocket WiFi" to provide my own wifi hotspot wherever I have a cell signal.
And for all my other routing needs, I just buy an appropriate little box.
gyro
Posted: Thu 14 May 2015, 22:35
by Bindee
My Bad , I wrongly assumed yours would be a better OS and use less resources.
Posted: Sun 29 Nov 2015, 06:27
by s243a
I brought both eth0 wlan0 up and assigned an ip address to eth0 via
ifconfig eth0 192.168.2.2
Running:
in directory
Code: Select all
/root/my-applications/shareInternet
produces
Code: Select all
+ BINDIR=/usr/local/shareInternet
+ '[' '' == txt ']'
+ '[' -f /root/.shareInternet/flagFiles/batch_start_running.txt ']'
+ '[' '' ']'
+ '[' -f /root/.shareInternet/flagFiles/sharingup.txt ']'
+ /usr/local/shareInternet/shareInternet start
[ -f /etc/dnsmasq.conf ] && dnsmasq -a "192.168.2.2" -F "192.168.2.100,192.168.2.200,60000" -l "/tmp/dnsmasq.leases.192.168.2"
modprobe: FATAL: Module ipt_MASQUERADE not found.
iptables: No chain/target/match by that name.
+ exit 0
I'm running tahrpup 6.02 and it doesn't apear to have the module ipt_MASQUERADE. How can I get this module for tahrpup 6.02?
Use "SNAT" instead of "MASQUERADE"
Posted: Fri 11 Dec 2015, 01:31
by gyro
@s243a,
An alternative approach is to stop "shareInternet" using "MASQUERADE" and use "SNAT" instead.
To do this, edit lines 58 and 59 of "/usr/local/shareInternet/firewall.sh". Change this:
Code: Select all
iptables -t nat -A POSTROUTING -s ${INIP%.*}.0/24 -o ${OUTSIDE_DEVICE} -j MASQUERADE
# iptables -t nat -A POSTROUTING -s ${INIP%.*}.0/24 -o ${OUTSIDE_DEVICE} -j SNAT --to-source ${OUTSIDE_IP}
to this:
Code: Select all
# iptables -t nat -A POSTROUTING -s ${INIP%.*}.0/24 -o ${OUTSIDE_DEVICE} -j MASQUERADE
iptables -t nat -A POSTROUTING -s ${INIP%.*}.0/24 -o ${OUTSIDE_DEVICE} -j SNAT --to-source ${OUTSIDE_IP}
i.e. comment out the "MASQUERADE" line and uncomment the "SNAT" line.
Note: I am unable to test this at this time. So if someone can test this and report back, I will issue a new version containing this patch.
gyro
Posted: Mon 14 Dec 2015, 06:42
by s243a
I saved my instructions for a manual start
here (also noted above on this thread). I have now commented out the lines given in the instructions on the original thread-noted for startup-on-boot. I presume that somewhere I will have to add to the configuration files commands to bring up eth0 and also to assign an ip address to eth0. I will look through the code to see if I can find an answer but perhaps someone will help me first
Posted: Tue 15 Dec 2015, 06:23
by s243a
So, as I suspected, making the changes mentioned at:
http://www.users.on.net/~wrags/ShareInternet-2.1.html
to start at boot didn't work because I didn't specify anywhere to bring up eth0 and assign an ip address to eth0. I'll try adding this to one of the mentioned files and see what happens.
Anyway, the following lines seem problematic:
Code: Select all
if [ -f /root/.shareInternet/flagFiles/batch_start_running.txt ]; then
error "ShareInternet was started at boot - still coming up."
exit 1
fi
This prevents me from stoping ShareInternet if it fails to load properly on startup. I commented out these lines and tried
and then when I tried to restart it with
I still got the error:
"ShareInterent was started at boot - still coming up."
This is because
does not delete the flag file /root/.shareInternet/flagFiles/batch_start_running.txt
The simple fix is to comment out the above mentioned lines. This allowed me to restart ShareInternet. If we were being more complex we could make the script not execute the error when someone gives the input "stop". Also with this more complex fix the flag file should be deleted if it exists when a stop command is given.
Posted: Tue 15 Dec 2015, 16:10
by gyro
@s243a,
If the flag file is still there, then either there's a 'hung' shareInternet process hanging around, or it crashed.
If you want to carry on any way, why not just delete "/root/.shareInternet/flagFiles/batch_start_running.txt"?
gyro
Posted: Fri 22 Jul 2016, 07:01
by s243a
I successfully used this pet to share the internet through a router. I haven't tried connecting multiple computers on it.
I created the following startup script:
Code: Select all
#/usr/bin/sh#www.pearltrees.com/s243a/shareinternet-puppylinux-pet/id15126192
#requires ipt_MASQUERADE_tahrpup-k3.14.20.pet
#See: murga-linux.com/puppy/viewtopic.php?t=96178&start=1140
ifconfig eth0 up #Bring the interface up
ifconfig eth0 192.168.2.1 #assign an ip adress to the interface
cd ~/my-applications/shareInternetsh AppRun #Start the Internet Sharing
Running this script returns:
Code: Select all
root# sh Star*
[ -f /etc/dnsmasq.conf ] && dnsmasq -a "192.168.2.1" -F "192.168.2.100,192.168.2.200,60000" -l "/tmp/dnsmasq.leases.192.168.2"
**not sure what this stuff means
On my d-link router I set the internet connection as DHCP which produced:
Code: Select all
IP Address: 192.168.2.152
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.2.1
Primary DNS Server: 192.168.2.1
Using tahrpup 6.0.5 on the PC which is reciving the shared connection configured the internet as follows:
under
menu/setup/internet connection wizard
selected "Wired or wireless LAN"
And then
Selected the bottom choice (i.e. "Network Wizard")
and than selected "Static IP"
I put in
Code: Select all
IP address = 192.168.2.1
Net Mask = 255.255.255.0
Primary Name Server = 192.168.0.1 (see etc/resolv.conf)
and I think for the gateway I put:
which seemed to tell the Network Wizard to find the default gateway for me, which returned
I think the gateway is the private ip address of the internet service provider gateway (i.e. that thing they give you to connect to the internet). Perhaps the operating system (or maybe the router) finds this address when it is building the routing table.
Posted: Fri 22 Jul 2016, 14:23
by Moose On The Loose
gyro wrote:01micko wrote:If I open ~/File-Sharing/Setup-Sharing and choose to find shared folders it only searches on the "192.168.1.x" network.
I've just had a quick look at the script run by ~/File-Sharing/Setup-Sharing. It always looks in the local network defined by the first IP address it finds in the output from "ifconfig". Would need to change the software to do something different.
But even more significantly it is not using Windows folder sharing. It's looking for FTP servers, something completely different. If it's Windows folder sharing you want, then you will need to use "samba" on Puppy.
I've used "samba" on a Fedora 9 machine, but never Puppy.
If you're trying to do Windows folder sharing through a router (puppy7), then I'm not sure there is any chance.
gyro
I use Samba on 528 it works but Windows-7 and up don't. They refuse to even think about an earlier Windows version being on the system and also won't interact with puppy. There is a setting in the registry to fix this.
I also run a web server on a puppy. If you include a local DNS you can have the machines referred to by name. If not, a trick I use is to have the Samba share a file with a link in it using the IP address. This way, a Windows user can find the system with the "network neighborhood" method and then click on a XXX.html file to get the link to the machine via the browser.
This is working around the limitations of Windows and Humans.