[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Help me setup iptables plis

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 5
Thread images: 3

File: sonic_vs_mario_2.png (846KB, 1650x1275px) Image search: [Google]
sonic_vs_mario_2.png
846KB, 1650x1275px
Help me setup iptables plis
>>
File: thefrench.jpg (131KB, 612x842px) Image search: [Google]
thefrench.jpg
131KB, 612x842px
>>62212178
no
>>
>>62212178
just use ufw
>>
# iptables -A OUTPUT -j REJECT
>>
File: 1502181592075.png (597KB, 714x528px)
1502181592075.png
597KB, 714x528px
>>62212178
more or less what I use

#PRECONFIGURE, flush and create logging table
iptables -F
iptables -N LOGGING


#INPUT
iptables -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#iptables -t filter -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
iptables -t filter -A INPUT -i lo -j ACCEPT


#drop a bunch of broadcast/udp trash from winbabs on my subnet
iptables -t filter -A INPUT -p udp -m multiport --ports 27036 -j DROP

iptables -t filter -A OUTPUT -p udp -d your.net.here.255 -j DROP
iptables -t filter -A OUTPUT -p udp -d 255.255.255.255 -j DROP

#LOGGING
iptables -t filter -A INPUT -j LOGGING
#drop some stuff that through experience has high volumes and would spam up logfile
#ditch the rules if you do not have others on your subnet so to log it I guess
#local peer discovery
iptables -t filter -A LOGGING -p udp -s your.net.here.0/24 -d 239.192.152.143 -j DROP
#broadcast
iptables -t filter -A LOGGING -p udp -s your.net.here.0/24 -d your.net.here.255 -j DROP
#broadcast
iptables -t filter -A LOGGING -p udp -s your.net.here.0/24 -d 255.255.255.255 -j DROP
#multicast
iptables -t filter -A LOGGING -s your.net.here.0/24 -d 224.0.0.0/24 -j DROP

#rate limiting
#iptables -t filter -A LOGGING -m limit --limit 20/min --limit-burst 10 -j LOG --log-prefix "IPD: " --log-level 4
#label it in /var/log/messages
iptables -t filter -A LOGGING -j LOG --log-prefix "IPD: " --log-level 4
#drop logged stuff, I guess you could set up more intricate rules to also log accepted things
iptables -t filter -A LOGGING -j DROP


#CLEANUP, print and save etc
iptables -L -v
/etc/init.d/iptables save
/etc/init.d/iptables restart

Thread posts: 5
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.