You are not logged in.
Pages: 1
Topic closed
Hello anyone know how i can do internet connection sharing in Slitaz?
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
Slitaz network script /etc/init.d/network.sh and it's configuration file /etc/network.conf support only one (1) network adapter(nic)
Offline
ohh noo
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.
would love some help with this as im kinda new to programming linux
some pointers, where to look etc. 
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
Thanx m8, so i supose it just for me to install dhcp on slitaz and it should be operational as an dhcp server too. ? 
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
Sweet
Cheers m8 ill give it a try 
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
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) ?
Maybe try Spider Button---> System Tools ---> Configure networking. It has a DHCP tab and options there.
Offline
Doesnt work with ETH1
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
yea i was thinking of moding it so if ETH1 exists route if not then skip
or something
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
You are my hero mojo 
Thanx 
- ztealmax
Pages: 1
Topic closed
[ Generated in 0.021 seconds, 10 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]