[Tutor] How can I do IP_MASQ by using Python?
dman
dman@dman.ddts.net
Mon, 29 Apr 2002 15:53:15 -0500
--U+BazGySraz5kW0T
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Apr 29, 2002 at 09:03:14PM +0800, Wenlong Liu wrote:
| Re: [Tutor] How can I do IP_MASQ by using Python?MGCP is Media Gateway Co=
ntrol Protocol. IETF RFC 2705
| http://www.ietf.org/rfc/rfc2705.txt?number=3D2705
|=20
| The Media Gateway Control Protocol (MGCP) is a signaling protocol
| for controlling Voice over IP (VoIP) Gateways from external call
| control elements across the Internet. The protocol itself make
| extensive use of network addresses located inside the message body,
| since that it is impossible to use MGCP through basic network
| address translation/network address port translation without an
| Application Level Gateway (ALG).
|=20
| A MGCP message is identified by the ALG using UDP port 2427 or 2727
| as the destination port. Actually the specified port number should
| be configurable. Most NAT implementations identify the type of
| traffic they will modify by using the port as an identifier, so this
| restriction seems practical.
Ok, I see now. Yes you could do this sort of task with python. You
would write a deamon to accept those packets on some other port,
parses and rewrites the body, then sends it out to the real
destination. Use iptables to redirect incoming packets to be
intercepted by your daemon rather than being forwarded out the other
interface.
HTH,
-D
--=20
You have heard the saying that if you put a thousand monkeys in a room with=
a
thousand typewriters and waited long enough, eventually you would have a ro=
om
full of dead monkeys.
(Scott Adams - The Dilbert principle)
=20
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg
--U+BazGySraz5kW0T
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAjzNsrsACgkQO8l8XBKTpRRGJgCgm95rP6Jm3LGNfbNW61L5VgJ8
wkwAniH6PAaablR8fwoDWXK6XAU60Bqg
=gI9M
-----END PGP SIGNATURE-----
--U+BazGySraz5kW0T--