SliTaz SliTaz Forum

You are not logged in.

#1 2011-05-19 17:31:23

Guest
Guest

Internet Connection Sharing

Hello anyone know how i can do internet connection sharing in Slitaz?

#2 2011-05-20 12:50:47

Guest
Guest

Re: Internet Connection Sharing

Anybody got any idea about this, i have two nic cards in the computer

i just want slitaz to be able to share its internet connection

#3 2011-05-20 15:03:49

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Internet Connection Sharing

Slitaz network script /etc/init.d/network.sh and it's configuration file /etc/network.conf support only one (1) network adapter(nic)

Offline

#4 2011-05-20 17:53:30

Guest
Guest

Re: Internet Connection Sharing

ohh noo sad all plans going out the window lol, but still it finds both nic's under network manager...

ohh well i just have to learn how to make my own network.sh etc to sort that problem out

or switch to another dist.

#5 2011-05-21 08:55:47

Guest
Guest

Re: Internet Connection Sharing

would love some help with this as im kinda new to programming linux

some pointers, where to look etc. smile

#6 2011-05-21 10:55:35

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: Internet Connection Sharing

Assuming eth0 is up on the WAN side and eth1 is your LAN side with ip 192.168.0.1/24 :

# tazpkg get-install iptables

# ifconfig eth1 192.168.0.1 up

# echo 1 > /proc/sys/net/ipv4/ip_forward

# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Any LAN host should have a default route to 192.168.0.1 (you should launch a DHCP server to push it)

-pascal

Offline

#7 2011-05-22 16:23:14

Guest
Guest

Re: Internet Connection Sharing

Thanx m8, so i supose it just for me to install dhcp on slitaz and it should be operational as an dhcp server too. ? big_smile

#8 2011-05-22 20:29:48

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: Internet Connection Sharing

To setup the dhcp server, edit the /etc/udhcpd.conf file and do '/etc/init.d/udhcpd start'.

You can also update RUN_DAEMONS in /etc/rcS.conf

-pascal

Offline

#9 2011-05-23 11:00:10

Guest
Guest

Re: Internet Connection Sharing

Sweet big_smile Cheers m8 ill give it a try big_smile

#10 2011-05-23 17:03:56

Guest
Guest

Re: Internet Connection Sharing

Sorry to be such a noob, but could anyone please

give me some finished examples of:

# tazpkg get-install iptables

# ifconfig eth1 192.168.0.1 up

# echo 1 > /proc/sys/net/ipv4/ip_forward

# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

/etc/udhcpd.conf

/etc/rcS.conf

to get dhcp server running on eth1 automaticly when comp starts up?

Cheers

-ztealmax

#11 2011-05-24 16:37:19

Guest
Guest

Re: Internet Connection Sharing

Anyway of getting network.sh to check for second network nice ETH1

and if it exist automaticly set it up as DHCP-Router (Internet Connection Sharing) ?

#12 2011-05-24 18:17:36

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: Internet Connection Sharing

Maybe try Spider Button---> System Tools ---> Configure networking. It has a DHCP tab and options there.

Offline

#13 2011-05-24 20:04:29

Guest
Guest

Re: Internet Connection Sharing

Doesnt work with ETH1

#14 2011-05-24 20:11:55

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: Internet Connection Sharing

cat /proc/net/dev

tells you if you have eth1 or not, so you could modify network.sh (or better do a personal script which would not get overwritten by a system upgrade and make /etc/rcS.conf call it adding it in the RUN_SCRIPTS row) to take eth1 up and setup internet connection sharing

Offline

#15 2011-05-25 11:59:32

Guest
Guest

Re: Internet Connection Sharing

yea i was thinking of moding it so if ETH1 exists route if not then skip

or something

#16 2011-05-26 17:19:13

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Internet Connection Sharing

SliTaz ICS Setup

eth0 connects to WAN with cable modem

eth1 connects to LAN with switch

# [c]tazpkg get-install iptables[/c]

# [c]leafpad /etc/init.d/local.sh[/c]

Add below echo "Starting local startup commands... "

#configure interface alias connected to LAN

ifconfig eth1 192.168.0.1 up

echo 1 > /proc/sys/net/ipv4/ip_forward

#configure iptables for interface alias connected to WAN

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# [c]leafpad /etc/rcS.conf[/c]

Add udhcpd to RUN_DAEMONS=

# [c]leafpad /etc/udhcpd.conf[/c]

interface eth1

opt dns 8.8.8.8 8.8.4.4

option subnet 255.255.255.0

opt router 192.168.0.1

opt broadcast 192.168.0.255

Reboot SliTaz ICS computer.

Reboot or restart networking on each LAN computer.

LAN computers access internet through SliTaz ICS

Offline

#17 2011-05-27 08:35:53

Guest
Guest

Re: Internet Connection Sharing

You are my hero mojo tongue

Thanx big_smile

- ztealmax

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.021 seconds, 10 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]