Check Network card
/interface print
set ip for nat card
/system package update download
Keep document that easy to find
Check Network card
/interface print
set ip for nat card
/system package update download
1. Download The Debian Bookworm network installation CD
2. install follow steps and on set software unselect all
note command to see network
ip a
3 sudo nano /etc/network/interfaces
tce-update
tce-load -wi dnsmaq
tce-load -wi ipv6-netfilter-6.6.8-tinycore
tce-load -wi iptables
/opt/bootlocal.sh
#!/bin/sh
# put other system startup commands here
/opt/eth1.sh &
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &
sudo iptables -A FORWARD -i eth1 -j ACCEPT &
sudo dnsmasq &
sudo sysctl -w net.ipv4.ip_forward=1 &
sudo crond &
/opt/eth1.sh
#!/bin/sh
# If you are booting Tiny Core from a very fast storage such as SSD / NVMe Drive and getting
# "ifconfig: SIOCSIFADDR: No such Device" or "route: SIOCADDRT: Network is unreachable"
# error during system boot, use this sleep statemet, otherwise you can remove it -
sleep 1
# kill dhcp client for eth1
sleep 1
if [ -f /var/run/udhcpc.eth1.pid ]; then
sudo kill `cat /var/run/udhcpc.eth1.pid`
sleep 1
fi
# configure interface eth1
sudo ifconfig eth1 192.168.137.1 netmask 255.255.255.0 broadcast 192.168.137.255 up
# Start the DHCP Server Process once the Interface is Ready with the IP Add
sleep 1
sudo udhcpd /etc/eth1_udhcpd.conf &
sudo udpsvd -E 0 69 tftpd /netboot
/etc/eth1_udhcpd.conf
max_leases 101
lease_file /opt/udhcpd.leases
start 192.168.137.100
end 192.168.137.200
interface eth1
boot_file /pxelinux.0
option tftp 192.168.137.1
option subnet 255.255.255.0
option router 192.168.137.1
option lease 43200
option dns 192.168.137.1
option domain local
/opt/.filetool.lst
opt
home
/netboot
/etc/eth1_udhcpd.conf
/var/spool/crond/crontabs/root
/var/spool/crond/crontabs/root
SHELL=/bin/sh
15 22 * * * /sbin/reboot > /tmp/reboot.log 2>&1
After
filetool.sh -b
PXE server
mkdir -p /netboot/pxelinux.cfg
/netboot/tc/core.gz
/netboot/tc/vmlinz
/netboot/pxelinux.0 --> from sysliux
/netboot/pxelinux.cfg/default
DEFAULT core
TIMEOUT 300
LABEL core
KERNEL /tc/vmlinuz
APPEND quiet initrd=/tc/core.gz
ln -s /netboot/pxelinux.0 /netboot/pxelinux.0 --> bug busybox udhcpd
how to update 14->15
/mnt/sda1/tce/boot/
replace corepure64.gz and vmlinuz64 to new version
1 rm corepure64.gz
2 rm vmlinuz64
3 wget http://tinycorelinux.net/16.x/x86_64/release/distribution_files/corepure64.gz
4 wget http://tinycorelinux.net/16.x/x86_64/release/distribution_files/vmlinuz64
5.tce-update
remove old extension
/etc/sysconfig/tcedir/optional/
install new use
tce
s = search extension
ipv6
select menu and show detail extension
q = quit to menu
i = install
sudo ip link show
sudo ip link set dev eth0 down
sudo dhclient eth0
This will bring your eth0 up by using DHCP. Your network is now configured (for the time being).
If you don't have DHCP enabled configure your network by issueing the commands below, the gateway address is the IP address of your router. And your IP should be in the same range as the router is.
sudo ip addr add 192.168.1.14/24 dev eth0 sudo ip link set dev eth0 up sudo ip route add default via 192.168.1.1
sudo vim /etc/network/interfaces
(:wq save and quit, i insert mode , esc exit insert mode, :q! exit not save)
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.10.1 netmask 255.255.255.0 network 192.168.10.0 broadcast 192.168.10.255
sudo vim /etc/sysctl.conf
# net.ipv4.ip_forward=1so that it now appears as
net.ipv4.ip_forward=1Save the file and run the following command to make the change effective without a reboot.
sudo sysctl -w net.ipv4.ip_forward=1
sudo vim /etc/rc.local
exit 0
line in the file./sbin/iptables -P FORWARD ACCEPT /sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADETo make these iptables rules active without rebooting, run the following commands:
sudo iptables -P FORWARD ACCEPT
sudo iptables –-table nat -A POSTROUTING -o eth0 -j MASQUERADE