Article 55AHQ Having to bring networking devices down then up on boot get internet.

Having to bring networking devices down then up on boot get internet.

by
voncloft
from LinuxQuestions.org on (#55AHQ)
I am in the process of rebuilding my router originally built via gentoo - and now into LFS. Whenever I reboot I have to bring down my WAN to get internet to the outside world. I am a bit stumped as to why. Here are some files

(WAN)
/etc/sysconfig/ifconfig.enp1s9
Code:ONBOOT=yes
IFACE=enp1s9
SERVICE=dhclient(LAN)
/etc/sysconfig/ifconfig.enp0s10
Code:NBOOT=yes
IFACE=enp0s10
SERVICE=ipv4-static
IP=192.168.1.1
GATEWAY=192.168.1.1
PREFIX=24
BROADCAST=192.168.1.255iptables
/etc/rc.d/rc.iptables
Code:modprobe nf_conntrack
modprobe nf_conntrack_ftp
modprobe xt_conntrack
modprobe xt_LOG
modprobe xt_state

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

for f in /proc/sys/net/ipv4/conf/*/rp_filter ; do echo 1 > $f ; done

iptables -F

iptables -t nat -F

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP

iptables -I INPUT 1 -i enp0s10 -j ACCEPT
iptables -I INPUT 1 -i lo -j ACCEPT
iptables -A INPUT -p UDP --dport bootps ! -i enp0s10 -j REJECT
iptables -A INPUT -p UDP --dport domain ! -i enp0s10 -j REJECT

iptables -A INPUT -p TCP ! -i enp0s10 -d 0/0 --dport 0:1023 -j DROP
iptables -A INPUT -p UDP ! -i enp0s10 -d 0/0 --dport 0:1024 -j DROP

iptables -I FORWARD -i enp0s10 -d 192.168.1.0/24 -j DROP
iptables -A FORWARD -i enp0s10 -s 192.168.1.0/24 -j ACCEPT
iptables -A FORWARD -i enp1s9 -d 192.168.1.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -o enp1s9 -j MASQUERADEAny advice would be greatly appreciated. I also ran the make-iptables command from the blfs bootscripts if that helps.latest?d=yIl2AUoC8zA latest?i=2olG97yLQj4:R-qv1v9XNds:F7zBnMy latest?i=2olG97yLQj4:R-qv1v9XNds:V_sGLiP latest?d=qj6IDK7rITs latest?i=2olG97yLQj4:R-qv1v9XNds:gIN9vFw2olG97yLQj4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments