Skip to contentSkip to conversation

forwarding traffic to different hosts

DISCUSSION Nick Drage 2 participants 2 messages Aug 26, 2004

lore
Share & tools
lore

Nick Drage

author
#0 lore raw

Hi,

Sorry, another question, things aren't working well for me tonight. If I want traffic to port 777 on a host to be redirected to another host on the same LAN, will this do the job?

I'm on host 198.81.129.100, and I want all traffic from IP address 207.155.252.12 to port 777 to be redirected to a different host, .101 on the same network, if I try this rule it fails:

iptables -t nat -I PREROUTING --source 207.155.252.12 -p tcp --dport 777 -j DNAT --to-destination 198.81.129.101

But I don't see anything in the logs. I tried permitting all traffic to port 777 in for FORWARD and OUTPUT tables, but that didn't make a difference.

Any ideas?

Signature · 1 line
mors omnia vincit
#1 lore raw
Quoted 10 lines · Nick Drage

Hi,

Sorry, another question, things aren't working well for me tonight. If I want traffic to port 777 on a host to be redirected to another host on the same LAN, will this do the job?

I'm on host 198.81.129.100, and I want all traffic from IP address 207.155.252.12 to port 777 to be redirected to a different host, .101 on the same network, if I try this rule it fails:

Quoted 8 lines

iptables -t nat -I PREROUTING --source 207.155.252.12 -p tcp --dport 777 -j DNAT --to-destination 198.81.129.101

But I don't see anything in the logs. I tried permitting all traffic to port 777 in for FORWARD and OUTPUT tables, but that didn't make a difference.

Any ideas?

Maybe it's a routing problem. Try to use ethereal to see what's happening with your packets and if you are receiving or sending ICMP error packets.

Signature · 12 lines
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
[email protected]
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"