Attention: All pages of this wiki depend on the pages that come before it, in order as they are listed on the Main Page. Please check for Dependencies.
Please also look at What You Need to Know Before Using This Wiki
Set up Basic Firewall Functions: Difference between revisions
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<b>TODO: change this to not use ifrename and use udev instead</b> | |||
==System Prep== | ==System Prep== | ||
*apt-get remove nfs-common rpcbind | *apt-get remove nfs-common rpcbind | ||
Line 4: | Line 6: | ||
==Multiple Network Interfaces on Debian== | ==Multiple Network Interfaces on Debian== | ||
*<b>BIG FAT NOTE: Do not use ifrename on current debian, use udev instead</b> | |||
**SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:a0:c9:2e:fe:db", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2" | |||
*for i in eth0 eth1 eth2; do ADD=$(ifconfig $i | head -1 | cut -f 11 -d " "); echo "$i mac $ADD" >> /etc/iftab; done | *for i in eth0 eth1 eth2; do ADD=$(ifconfig $i | head -1 | cut -f 11 -d " "); echo "$i mac $ADD" >> /etc/iftab; done | ||
*vi [[/etc/network/interfaces]] | *> /etc/network/interfaces; vi [[/etc/network/interfaces]] | ||
==Configure Packet Forwarding / Basic IPTables Rules Set / Network Startup Script== | ==Configure Packet Forwarding / Basic IPTables Rules Set / Network Startup Script== |
Latest revision as of 22:02, 6 May 2019
TODO: change this to not use ifrename and use udev instead
System Prep
- apt-get remove nfs-common rpcbind
- apt-get install ifrename
Multiple Network Interfaces on Debian
- BIG FAT NOTE: Do not use ifrename on current debian, use udev instead
- SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:a0:c9:2e:fe:db", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
- for i in eth0 eth1 eth2; do ADD=$(ifconfig $i | head -1 | cut -f 11 -d " "); echo "$i mac $ADD" >> /etc/iftab; done
- > /etc/network/interfaces; vi /etc/network/interfaces
Configure Packet Forwarding / Basic IPTables Rules Set / Network Startup Script
- sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf
- sysctl -p
- mkdir /root/scripts
- vi /root/scripts/iptables-restore
- iptables-restore < /root/scripts/iptables-restore
- vi /root/scripts/netup.sh
- vi /root/scripts/netdown.sh