Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 11 Dec 2017, 21:17
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
shareInternet-2.2.6.pet - Puppy as router - bugfix
Post new topic   Reply to topic View previous topic :: View next topic
Page 9 of 10 [137 Posts]   Goto page: Previous 1, 2, 3, ..., 7, 8, 9, 10 Next
Author Message
gyro

Joined: 28 Oct 2008
Posts: 1409
Location: Brisbane, Australia

PostPosted: Sun 03 May 2015, 13:26    Post subject: Re: I can connect the devices, but not the Internet
Subject description: Puppy Precise 5.7.1
 

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
Back to top
View user's profile Send private message 
MyPuppysaysWauWau


Joined: 20 Feb 2014
Posts: 147
Location: Austria/Vienna

PostPosted: Tue 05 May 2015, 02:33    Post subject: Re: I can connect the devices, but not the Internet
Subject description: Puppy Precise 5.7.1
 

gyro wrote:

Try "modprobe -v iptable_nat"

gyro

Thx Smile

But I got the message: "FATAL: Module iptable_nat not found"

_________________
Don't start because it's easy. Start because it's worth trying. Don't stop because it's hard. Stop because you tried your Best.
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1409
Location: Brisbane, Australia

PostPosted: Tue 05 May 2015, 08:59    Post subject: Re: I can connect the devices, but not the Internet
Subject description: Puppy Precise 5.7.1
 

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:
Code:
# CONFIG_NF_NAT_IPV4 is not set
This means that nat support is not compiled into the kernel.
So looks like no go without a kernel compile.

gyro
Back to top
View user's profile Send private message 
MyPuppysaysWauWau


Joined: 20 Feb 2014
Posts: 147
Location: Austria/Vienna

PostPosted: Tue 05 May 2015, 09:29    Post subject:  

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?

_________________
Don't start because it's easy. Start because it's worth trying. Don't stop because it's hard. Stop because you tried your Best.
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1409
Location: Brisbane, Australia

PostPosted: Tue 05 May 2015, 11:46    Post subject: download Slacko 5.6-4G  

8Geee wrote:
Is there a link/pet/DL for that particular version? TIA
Try http://distro.ibiblio.org/puppylinux/puppy-5.6/ or http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux/puppy-5.6/

gyro
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 1494
Location: Italy

PostPosted: Tue 05 May 2015, 12:09    Post subject:  

@8Geee

The following thread may help:

http://www.murga-linux.com/puppy/viewtopic.php?t=93449&sid=b3c1ed6a23f83e9e79487de3f3789a83
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1409
Location: Brisbane, Australia

PostPosted: Tue 05 May 2015, 12:26    Post subject:  

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
Back to top
View user's profile Send private message 
Bindee

Joined: 19 Jun 2014
Posts: 365

PostPosted: Wed 13 May 2015, 03:08    Post subject:  

* removed *
Last edited by Bindee on Thu 14 May 2015, 18:34; edited 1 time in total
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1409
Location: Brisbane, Australia

PostPosted: Thu 14 May 2015, 04:32    Post subject:  

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
Back to top
View user's profile Send private message 
Bindee

Joined: 19 Jun 2014
Posts: 365

PostPosted: Thu 14 May 2015, 18:35    Post subject:  

My Bad , I wrongly assumed yours would be a better OS and use less resources.
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 685

PostPosted: Sun 29 Nov 2015, 02:27    Post subject:  

I brought both eth0 wlan0 up and assigned an ip address to eth0 via
ifconfig eth0 192.168.2.2

Running:
Code:
sh -x shareInterent

in directory
Code:
/root/my-applications/shareInternet

produces
Code:

+ 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?
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1409
Location: Brisbane, Australia

PostPosted: Thu 10 Dec 2015, 21:31    Post subject: Use "SNAT" instead of "MASQUERADE"  

@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:
    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:
#    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
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 685

PostPosted: Mon 14 Dec 2015, 02:42    Post subject:  

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 Smile
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 685

PostPosted: Tue 15 Dec 2015, 02:23    Post subject:  

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:

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
Code:

sh -x AppRun stop.

and then when I tried to restart it with
Code:

sh -x AppRun

I still got the error:
"ShareInterent was started at boot - still coming up."

This is because
Code:

sh -x AppRun stop

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.
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1409
Location: Brisbane, Australia

PostPosted: Tue 15 Dec 2015, 12:10    Post subject:  

@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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 9 of 10 [137 Posts]   Goto page: Previous 1, 2, 3, ..., 7, 8, 9, 10 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0642s ][ Queries: 14 (0.0107s) ][ GZIP on ]