The main goal of this page is to give some hints to well "cook" a linux box supporting H.323 network address translation.
Since 2.4.24 kernel you can get an already patched version.
| Kernel | Patch | iptables | Result |
|---|---|---|---|
| 2.4.18 | newnat13 | 1.2.6? | ok |
| 2.4.19 | newnat16 | i1.2.6? | ok |
| 2.4.20 | helpers-2.4.20 | 1.2.7 | ok |
| 2.4.21 | helpers-2.4.21 | 1.2.7 | ok |
| 2.4.24 | integrated | 1.2.9 | ok |
shell>cd /usr/src/linux shell>gunzip -cd newnat13-and-helpers-2.4.18.gz | patch -p1 -E
[*] Network packet filtering (replaces ipchains)
After you have selected this option a new one will appear.
IP: Netfilter Configuration --->
Select it by pressing [enter] then select:
<M> Connection tracking (required for masq/NAT) < > FTP protocol support (NEW) < > TFTP protocol support (NEW) <M> talk protocol support (NEW) <M> H.323 (netmeeting) support (NEW) < > IRC protocol support (NEW) < > GRE protocol support (NEW) < > Userspace queueing via NETLINK (EXPERIMENTAL) <M> IP tables support (required for filtering/masq/NAT) < > limit match support (NEW) < > MAC address match support (NEW) < > netfilter MARK match support (NEW) < > Multiple port match support (NEW) < > TOS match support (NEW) < > AH/ESP match support (NEW) < > LENGTH match support (NEW) < > TTL match support (NEW) < > tcpmss match support (NEW) < > Helper match support (NEW) < > Connection state match support (NEW) < > RPC match support (NEW) < > Unclean match support (EXPERIMENTAL) (NEW) < > Owner match support (EXPERIMENTAL) (NEW) < > Packet filtering (NEW) <M> Full NAT (NEW) <M> MASQUERADE target support (NEW) <M> REDIRECT target support (NEW) [*] NAT of local connections (READ HELP) (NEW) < > Basic SNMP-ALG support (EXPERIMENTAL) (NEW) < > Packet mangling (NEW) < > LOG target support (NEW) < > ULOG target support (NEW) < > TCPMSS target support (NEW) < > ipchains (2.2-style) support < > ipfwadm (2.0-style) support
Note:
This is a minimalistic setup, you should customize it to fit your needs.
To masquerade:
shell>iptables -t nat -A POSTROUTING -o your_external_interface -j MASQUERADE
To translate H.323 :
shell>iptables -A PREROUTING -t nat -p TCP -d $external_ip_of_your_gateway --dport 1720 -j DNAT --to $ip_of_your_meeting_box:1720 shell>iptables -A PREROUTING -t nat -p TCP -d $external_ip_of_your_gateway --dport 1503 -j DNAT --to $ip_of_your_meeting_box:1503