Editing
Basale infrastructuur
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== iptables == * http://www.dd-wrt.com/wiki/index.php/Iptables_command * http://www.openpages.info/iptables/ BLokkeren msn is op poort 1863, de poort wijzigt van tijd tot tijd. :-( === Gewone router forwarding === Configureer forwarding als volgt: <pre> #!/bin/bash # ip_domU_win="10.x.y.13" # echo 1 > /proc/sys/net/ipv4/ip_forward # # Let op: # De flush '-F' regels verwijderen als het een vpn-router is # /sbin/iptables -F /sbin/iptables -t nat -F /sbin/iptables -t mangle -F /sbin/iptables -F INPUT /sbin/iptables -F OUTPUT /sbin/iptables -F FORWARD # # Faciliteer RDP voor de Windows machine # /sbin/iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -p tcp -s 0.0.0.0 -d 10.x.y.13 --dport 3389 -j ACCEPT /sbin/iptables -A FORWARD -d 10.x.y.13 -p tcp --dport 3389 -j ACCEPT /sbin/iptables -t nat -A PREROUTING -d a.b.c.d -p tcp --dport 3389 -j DNAT --to 10.x.y.13 # /sbin/iptables -t nat -A POSTROUTING -o eth0 -s 10.x.y.13 -p tcp --sport 3389 --dport 3389 -j ACCEPT # # Blokkeer Internet voor de Windows machine # /sbin/iptables -A FORWARD -i eth0 -o eth1 -s ! 10.0.0.0/8 -d $ip_domU_win -j DROP /sbin/iptables -A INPUT -i eth0 -s ! 10.0.0.0/8 -d $ip_domU_win -j DROP /sbin/iptables -A OUTPUT -o eth0 -s $ip_domU_win -d ! 10.0.0.0/8 -j DROP # # Zorg voor forwarding van de machines van het locale netwerk # /sbin/iptables -A INPUT -i eth0 -d 10.29.20.0/26 -j ACCEPT /sbin/iptables -A OUTPUT -o eth0 -s 10.29.20.0/26 -j ACCEPT /sbin/iptables -A FORWARD -i eth1 -s 10.29.20.0/26 -o eth0 -j ACCEPT /sbin/iptables -t nat -A POSTROUTING -o eth0 -s 10.29.20.0/26 -j MASQUERADE # /sbin/iptables -A FORWARD -i eth0 -s 10.0.0.0/8 -o eth1 -d 10.29.20.0/26 -j ACCEPT /sbin/iptables -t nat -A PREROUTING -d 10.29.20.0/26 -j ACCEPT </pre> In deze opzet is de Windows machine van buitenaf te benaderen, maar de Windows machine zelf is geblokkeerd voor Internet verkeer. === Blokkeren ongecontroleerd smtp verkeer === Het verdient in een omgeving met Windows clients aanbeveling om het risico van ongecontroleerd mailverkeer over de default gateway, dat is naar alle waarschijnlijkheid spam, te loggen en te blokkeren op de firewall. Daartoe staan onderstaande regels in /usr/local/bin/local-rules.sh: <pre> /sbin/iptables -F SMTPLOG /sbin/iptables -N SMTPLOG /sbin/iptables -A FORWARD -p tcp --dport 25 -j LOG --log-prefix "dropped smtp packets : " --log-level warning /sbin/iptables -A SMTPLOG -p tcp --dport 25 -j LOG --log-prefix "dropped smtp packets : " --log-level warning /sbin/iptables -A FORWARD -p tcp --dport 25 -j DROP </pre>
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information