Skip to contentSkip to conversation

packet replication for easier NAT

feature request Matthias Benkmann 2 participants 2 messages Oct 10, 2002 – Oct 14, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

We have a Linux box as NAT router. Sometimes the users in our LAN want to set up listening sockets on random ports (e.g. server written as compsci homework). Reconfiguring the NAT router every time to route the respective port to the right computer is unfeasible. I'd like to have a feature that replicates connection request packets coming from the Internet and sends them to all computers in the network. The computer listening on the requested port would acknowledge the request and the other computers would drop or reject it. If the NAT router does not route reject packets, only the acknowledgement will get out on the Internet and the connection will get established.
This feature (if it can be implemented, I don't know enough about TCP/IP and NAT to say for sure) would make NAT a lot more transparent. It would lose the firewall aspects but that's no worse than a direct connection. It would fail sometimes (2 programs on different computers picking the same port for listening) but in a small home LAN that can be coordinated easily. On the bright side, this feature should make it possible to use a lot of services from behind a NAT router without any additional configuration effort.

MSB

Signature · 3 lines
An army of sheep led by a lion
is stronger than an army of lions
led by a sheep.
#1 lore raw
Quoted 3 lines · Matthias Benkmann

This feature (if it can be implemented, I don't know enough about TCP/IP and NAT to say for sure) would make NAT a lot more transparent. It would lose the firewall aspects but that's no worse than a direct connection.

It would compromise the little bit of security you have. What happens if somebody makes one machine listen on all ports? he gets all connections for everybody. great.

And: every connection attempt would flood your network. Every syn packet coming in on the NAT gateway would need to be replicated N times, where N is the number of machines on the internal network.

Quoted 3 lines

It would fail sometimes (2 programs on different computers picking the same port for listening) but in a small home LAN that can be coordinated easily.

No, it cannot.

Quoted 3 lines

On the bright side, this feature should make it possible to use a lot of services from behind a NAT router without any additional configuration effort.

It is a horrible hack fro administrators who are too lazy to do even the smallest task.

Quoted 1 line

MSB

Signature · 5 lines
Live long and prosper
- Harald Welte / [email protected]               http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
 as I'm the dictator."  --  George W. Bush Dec 18, 2000