[iptables] een gameserver draaien

Pagina: 1
Acties:

  • Zynth
  • Registratie: September 2001
  • Laatst online: 29-07 15:30
Mijn workstation hangt achter een linuxserver met een iptables firewall.
Maar nu zou ik graag op mijn workstation een server (Medal of Honor) draaien,
naar buiten toe.
Ik dacht dat het dan voor medal of honor wel mogelijk zou zijn om
via iptables, de gameport 12203 te forwarden naar mijn workstation.
ik gebruik deze 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
IPTABLES="/usr/sbin/iptables"

#Blocked ALLE Traffic naar de server
$IPTABLES -F
$IPTABLES -N block
$IPTABLES -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A block -m state --state NEW -i ! eth0 -j ACCEPT

#Allowed ALLEEN de opgegeven poorten: 22 80
$IPTABLES -A block -p tcp --destination-port 22 --syn -j ACCEPT
$IPTABLES -A block -p tcp --destination-port 80 --syn -j ACCEPT
$IPTABLES -A block -p tcp --destination-port 998 --syn -j ACCEPT

#ZOU de traffic van poort 12203 naar mijn workstation door moeten sturen...
$IPTABLES -t nat -A PREROUTING -i eth0 -p tcp --dport 12203 -j DNAT --to-destination 192.168.0.10:12203



#$IPTABLES -A block -p tcp -m --destination-port 8765,898 --syn -j ACCEPT
#$IPTABLES -A block -p tcp --destination-port 8766 --syn -j ACCEPT

#$IPTABLES -A block -j LOG
$IPTABLES -A block -j DROP
$IPTABLES -A INPUT -j block
$IPTABLES -A FORWARD -j block


#--------------------------------------------
#Zet deze server in als gateway
$IPTABLES -t nat -A POSTROUTING -j MASQUERADE


Doe ik iets fout? of kan het gewoon niet?