Results 1 to 2 of 2
Hello,
So to begin, we are going to have a LAN party (just with some friends) on doomsday (21 december). So the plan is, that i install a Server (wich ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-27-2012 #1Just Joined!
- Join Date
- Apr 2012
- Posts
- 8
Linux Firewall/Proxy/ ???
Hello,
So to begin, we are going to have a LAN party (just with some friends) on doomsday (21 december). So the plan is, that i install a Server (wich i have) between the modem and the router. (Yes the server has 2 network ports)
Now i want to block all internet connection from a certain time. I just don't know how to do it.
Any help?
Erates
- 11-27-2012 #2
You could read up on what rules do and how to use them with this TUTORIAL
Here is a very simple setup that will allow all connections out and only established connection back in.
You will need to replace the <inside> and <outside> with your interfaces that are connected to the inside and outside.Code:iptables -P INPUT DROP iptables -P OUTPUT DROP iptables -P FORWARD DROP iptables -A INPUT -i <inside> -m conntrack --ctstate NEW,RELATED,ESTABLISHED-j ACCEPT iptables -A OUTPUT -o <inside> -m conntrack --ctstate NEW,RELATED,ESTABLISHED-j ACCEPT iptables -A FORWARD -i <inside> -m conntrack --ctstate NEW,RELATED,ESTABLISHED-j ACCEPT iptables -A FORWARD -i <outside> -m conntrack --ctstate RELATED,ESTABLISHED-j ACCEPT
What the above does is allow you to log into the server from the LAN only.
Traffic will pass from the LAN to the WAN and only established connection will be allowed to pass from the WAN to the LAN


Reply With Quote
