Toon posts:

[iptables] doodvallen van bericht

Pagina: 1
Acties:
  • 525 views sinds 30-01-2008
  • Reageer

Verwijderd

Topicstarter
Hallo,

Sinds kort hebben familie van me in Canada ISPQ geinstalleerd. ISPQ is een prog voor videoconferencing nu probeer ik m'n ma's pc ook op ispq te krijgen.

Het volgende:
Ik krijg het voor mekaar om de poorten te forwarden, alleen als me moeder een QuickMessage (soort email bericht met foto) probeert te versturen komt ie pas een dag later aan, of helemaal niet aan!

Zou dit komen door m'n firewall?

hieronder m'n firewall
code:
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
######################
# Setup IP firewalling
######################
# Default policies
iptables=/sbin/iptables
$iptables -F
$iptables -Z
$iptables -X

$iptables -t nat -F
$iptables -t nat -Z
$iptables -t nat -X

echo "Flushing"

$iptables -P INPUT DROP
$iptables -P FORWARD DROP
$iptables -P OUTPUT ACCEPT
$iptables -F INPUT
$iptables -F FORWARD
$iptables -F OUTPUT
# Create a common chain for the INPUT and FORWARD handling
$iptables -N block
$iptables -F block
# Allow traffic on established connections
$iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow new connections if not from the outside
$iptables -A block -m state --state NEW -i ! eth0 -j ACCEPT
# Allow new connections to our public services
# For home users there are normally none
$iptables -A block -m state --protocol tcp --state NEW --destination-port 80 -j ACCEPT
#$iptables -t nat -A PREROUTING -i eth0 -p tcp -d 212.187.*.* --dport
#80 -j DNAT --to 192.168.5.12:80
echo "Opening Ports"

$iptables -A block -m state --protocol tcp --state NEW --destination-port 113 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port smtp -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 22 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 21 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 110 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 6666 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 6667 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 6668 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 6669 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 7000 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 7001 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 7002 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 7151 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 53 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 7152 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 7005 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 23 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 9192 -j ACCEPT

$iptables -A block -m state --protocol udp --state NEW --destination-port 53 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 5050 -j ACCEPT

$iptables -A block -m state --protocol tcp --state NEW --destination-port 6697 -j ACCEPT
$iptables -A block -m state --protocol tcp --state NEW --destination-port 8080 -j ACCEPT



#$iptables -A block -m state --protocol tcp --state NEW --destination-port 27500 -j ACCEPT
#$iptables -A block -m state --protocol udp --state NEW --destination-port 27500 -j ACCEPT
#$iptables -A block -m state --protocol udp --state NEW --destination-port 27015 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 27015 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 27016 -j ACCEPT
#$iptables -A block -m state --protocol udp --state NEW --destination-port 27016 -j ACCEPT

#$iptables -A block -m state --protocol tcp --state NEW --destination-port 27017 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 27010 -j ACCEPT
#$iptables -A block -m state --protocol tcp --state NEW --destination-port 27005 -j ACCEPT
#$iptables -A block -m state --protocol udp --state NEW --destination-port 27005 -j ACCEPT
#$iptables -A block -m state --protocol udp --state NEW --destination-port 27010 -j ACCEPT




$iptables -A block -m state --protocol udp --state NEW --destination-port 1900 -j ACCEPT

$iptables -A INPUT -p icmp -j ACCEPT 
$iptables -A INPUT -p 41 -j ACCEPT
$iptables -A block -p icmp --icmp-type echo-request -j ACCEPT
# Block anything else
#$iptables -A block -j LOG --log-level info --log-prefix=Firewall:
# Activate the new chain
$iptables -A INPUT -j block


$iptables -A FORWARD -j ACCEPT #poortforwarden accepteren
$iptables -t nat -F POSTROUTING
$iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 >/proc/sys/net/ipv4/ip_forward


#Forwarding accepteren en opvangen
$iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

##doorlaten webcam naar interne pc

$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 8180 -j DNAT --to 192.168.5.12:8180
echo "Poort-Forwarding naar interne netwerk"


##Forwarden van Webcam Programma poorten

$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 2000:2038 -j DNAT --to 192.168.5.12 
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 2084:2086 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 3010:3030 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 2050 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 2051 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 2069 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 2019 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 2000:2038 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 2084:2086 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 3010:3030 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 2050 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 2051 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 2069 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 2019 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 1024:5000 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 1024:5000 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 6700:6702 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 6880 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 12000:16090 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p tcp -d 212.187.*.* --dport 7100 -j DNAT --to 192.168.5.12
$iptables -A PREROUTING -t nat -p udp -d 212.187.*.* --dport 7100 -j DNAT --to 192.168.5.12



$iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
$iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT
$iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT

# Aanzetten van het ip forwarden.
#echo 1 > /proc/sys/net/ipv4/ip_forward
# Aanzetten van ip spoofing beveiliging.
for f in /proc/sys/net/ipv4/conf/*/rp_filter ; do
    echo 1 > $f
done

# Uitzetten van de ICMP zend acceptatie.
for f in /proc/sys/net/ipv4/conf/*/send_redirects ; do
    echo 0 > $f
done

# Uitzetten van ICMP acceptatie redirects.
for f in /proc/sys/net/ipv4/conf/*/accept_redirects ; do
    echo 0 > $f
done

# Source geroute pakketten niet accepteren.
for f in /proc/sys/net/ipv4/conf/*/accept_source_route ; do
    echo 0 > $f
done

# Log de spoofed pakketten, source routed pakketten en redirect pakketten.
for f in /proc/sys/net/ipv4/conf/*/log_martians ; do
    echo 1 > $f
done

# Zet de TCP SYN cookie beveiliging aan.
# echo 1 > /proc/sys/net/ipv4/tcp_syncookies

# Zet ICMP broadcast beveiliging aan.
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

# Zet ICMP dode error boodschappen beveiliging aan.
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses

# Zet dynamische tcp/ip addres hacking aan.
echo 1 > /proc/sys/net/ipv4/ip_dynaddr

  • not-known
  • Registratie: Februari 2002
  • Laatst online: 14-08 22:40

not-known

[BI] Crewmember

kan je denk gewoon t best proberen door je pc direct op internet aan t sluiten als da kan of anders zoveel mogelijk je firewall ff uit te zetten lijkt mij :)

Officiëel bikkel'n in #bikkels
Campzone Veld C FieldAdmin
De Veld C site!


Verwijderd

Topicstarter
tja
is pc van me ma en die staat beneden.. ver van de kabelmodem
dus lijkt me niet strak plan!

Alleen ik kan firewall niet uitzette dan heb ik geen inet meer in het netwerk :P

maar ik snap het niet, tis net of ie dood valt ofsow

  • not-known
  • Registratie: Februari 2002
  • Laatst online: 14-08 22:40

not-known

[BI] Crewmember

misschien moet je niet de hele firewall uitgooien, maar alleen de sharing van internet aanlaten zodat je internet nog wel gedeeld is.
en anders misschien een proxy / socks server installeren?

Officiëel bikkel'n in #bikkels
Campzone Veld C FieldAdmin
De Veld C site!


Verwijderd

Topicstarter
In m'n tcpdump komt vaak de regel
icmp: server.*.nl udp port 1900 unreachable