This repository has been archived by the owner on Feb 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
iptables.conf
40 lines (40 loc) · 2.24 KB
/
iptables.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Generated by iptables-save v1.8.4 on Fri Mar 26 20:03:05 2021
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [40:2880]
-A INPUT -s 192.168.100.0/24 -p tcp -m tcp --dport 22 -j ACCEPT
-A FORWARD -s 192.168.200.0/24 -d 192.168.100.0/24 -i eth0 -o eth1 -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A FORWARD -s 192.168.100.0/24 -d 192.168.200.0/24 -i eth1 -o eth0 -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A FORWARD -s 192.168.100.0/24 -i eth1 -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A FORWARD -d 192.168.100.0/24 -o eth1 -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A FORWARD -s 192.168.100.0/24 -i eth1 -p tcp -m tcp --dport 53 -j ACCEPT
-A FORWARD -s 192.168.100.0/24 -i eth1 -p udp -m udp --dport 53 -j ACCEPT
-A FORWARD -d 192.168.100.0/24 -o eth1 -p tcp -m tcp --sport 53 -j ACCEPT
-A FORWARD -d 192.168.100.0/24 -o eth1 -p udp -m udp --sport 53 -j ACCEPT
-A FORWARD -s 192.168.100.0/24 -i eth1 -p tcp -m multiport --dports 80,8080,443 -j ACCEPT
-A FORWARD -d 192.168.100.0/24 -o eth1 -p tcp -m multiport --sports 80,8080,443 -j ACCEPT
-A FORWARD -s 192.168.200.0/24 -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -d 192.168.200.0/24 -o eth0 -p tcp -m tcp --sport 80 -j ACCEPT
-A FORWARD -s 192.168.100.0/24 -d 192.168.200.0/24 -i eth1 -o eth0 -p tcp -m tcp --dport 22 -j ACCEPT
-A FORWARD -s 192.168.200.0/24 -d 192.168.100.0/24 -i eth0 -o eth1 -p tcp -m tcp --sport 22 -j ACCEPT
-A OUTPUT -d 192.168.100.0/24 -p tcp -m tcp --sport 22 -j ACCEPT
COMMIT
# Completed on Fri Mar 26 20:03:05 2021
# Generated by iptables-save v1.8.4 on Fri Mar 26 20:03:05 2021
*nat
:PREROUTING ACCEPT [103:8139]
:INPUT ACCEPT [1:60]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [3:252]
:DOCKER_OUTPUT - [0:0]
:DOCKER_POSTROUTING - [0:0]
-A OUTPUT -d 127.0.0.11/32 -j DOCKER_OUTPUT
-A POSTROUTING -d 127.0.0.11/32 -j DOCKER_POSTROUTING
-A POSTROUTING -o eth0 -j MASQUERADE
-A DOCKER_OUTPUT -d 127.0.0.11/32 -p tcp -m tcp --dport 53 -j DNAT --to-destination 127.0.0.11:46391
-A DOCKER_OUTPUT -d 127.0.0.11/32 -p udp -m udp --dport 53 -j DNAT --to-destination 127.0.0.11:45560
-A DOCKER_POSTROUTING -s 127.0.0.11/32 -p tcp -m tcp --sport 46391 -j SNAT --to-source :53
-A DOCKER_POSTROUTING -s 127.0.0.11/32 -p udp -m udp --sport 45560 -j SNAT --to-source :53
COMMIT
# Completed on Fri Mar 26 20:03:05 2021