Networking is a little more than IPs and netmasks | Linux Today

Networking is a little more than IPs and netmasks

Written By
Web Webster
Web Webster
Mar 29, 2010

[ Thanks to Edmundo
for this link. ]

“Very recently I was asking this questions (which is
still open) at www.linuxquestions.org (the first place I hit when I
have a question regarding linux or gnu, by the way) and took a
brief look at the questions open on the networking forum and I hit
this beauty.

“It’s a guy who has set up DNAT on netfilter to forward packets
that are sent to one host to another server that does the real
work. Think of it as a proxy. In his example, he wanted to forward
packets that arrive at his host on port 3306 to port 3197 on
another host (let’s use IP a.a.a.a). So, he set up a simple rule on
(nat) PREROUTING:

$ iptables -t nat -A PREROUTING -p tcp –dport 3306 -j DNAT –to
a.a.a.a:3197

“What this rule is doing is telling the kernel to change the
destination IP address of any packet that arrives at his host
through any network interface to IP address a.a.a.a (reachable from
his server, maybe not from the host that originated said packages)
and the destination port to 3197”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.