This repository provides a Linux SLIP (Serial Line Internet Protocol) TUN (Network Tunneling) interface. It allows communication between a Linux system and a device connected via a serial port using SLIP protocol.
Special thanks to marcinbor85 for his custom implementation of SLIP with CRC.
git clone --recurse-submodules https://github.com/evil-lrs/slip-netif.git
make
make install
slip-netif -s <serial_name> -b <baud_rate> [-i <interface_name>] [-v]
To configure the interface, use the following command:
ifconfig tun0 10.1.1.1/24 up mtu 1500
To prevent broadcast/multicast packet flooding, you can use iptables:
sudo iptables -A OUTPUT -o tun0 -m pkttype --pkt-type multicast -j DROP
sudo iptables -A OUTPUT -o tun0 -m pkttype --pkt-type broadcast -j DROP