Toon posts:

Redhat 7.1 portforwarding

Pagina: 1
Acties:

Verwijderd

Topicstarter
Op dit moment heb ik als gateway RedHat 7.1 draaien...

alleen nu wil ik een paar porten naar me eigen pc forwarden, met de oudere versies van redhat gebruikte ik gewoon ipmasqadm, maar helaas werkt dit niet meer..

mijn vraag dus, weet iemand hoe je porten kan forwarden in redhat 7.1

mvg Rymo

  • RemcoX
  • Registratie: Mei 2000
  • Laatst online: 14-02 20:05
code:
1
2
3
4
5
6
7
8
9
10
11
12
[root@michael ~]# cat /etc/redhat-release 
Red Hat Linux release 7.1 (Seawolf)
[root@michael ~]# cat iptables.portfw 
#!/bin/bash
iptables -A PREROUTING -t nat -p tcp -d x.x.x.x --dport 20 -j DNAT --to 192.168.0.7:20
iptables -A PREROUTING -t nat -p tcp -d x.x.x.x --dport 21 -j DNAT --to 192.168.0.7:21
iptables -A PREROUTING -t nat -p tcp -d x.x.x.x --dport 22 -j DNAT --to 192.168.0.7:22
iptables -A PREROUTING -t nat -p tcp -d x.x.x.x --dport 25 -j DNAT --to 192.168.0.7:25
iptables -A PREROUTING -t nat -p tcp -d x.x.x.x --dport 80 -j DNAT --to 192.168.0.7:80
iptables -A PREROUTING -t nat -p tcp -d x.x.x.x --dport 110 -j DNAT --to 192.168.0.7:110
iptables -A PREROUTING -t nat -p tcp -d x.x.x.x --dport 3306 -j DNAT --to 192.168.0.7:3306
iptables -A PREROUTING -t nat -p tcp -d x.x.x.x --dport 3264 -j DNAT --to 192.168.0.7:3264