Outgoing DNAT, incoming SNAT?


Go Back   Computer Help Articles > Windows XP Network Web
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-05-2006, 04:04 AM
myopius@gmail.com
 
Posts: n/a
Default Outgoing DNAT, incoming SNAT?

(I posted this in .general earlier, but maybe this is better? I'm not
sure what the significance of _web is, but this question is
network-related.)

I know it's possible to perform SNAT on outgoing packets and DNAT on
incoming ones, for purposes of IP masquerading, but is it possible to
perform DNAT on outgoing packets and SNAT on incoming packets that
match specific IP addresses, or specific IP addresses and ports? If so,
what do I need to do that, and how do I do it?

I have a client program which doesn't allow me to alter the IP/ports to
which it connects, and seeing as I can't compile from source, this
would allow me to connect to a different IP which is accessible and
that in turn connects to the server through port forwarding.

Using iptables in Linux I can accomplish this easily with rules
resembling:

iptables -t nat -A OUTPUT -p tcp -o eth0 -d 64.233.161.99 -dport 80 -j
DNAT --to-destination 216.155.200.155
iptables -t nat -A POSTROUTING -p tcp -s 216.155.200.155 -sport 80 -j
SNAT --to-source 64.233.161.99

which is what I would type to make it so that whenever I tried to
connect out to Google's web server, I would be connected to Altavista
instead. (This is just an example, my client isn't a web client.)

Right now my connection to the internet is through the LAN, behind a
router. I'm assigned an IP address over DHCP.

Thanks,
Matt

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outgoing DNAT, incoming SNAT? myopius@gmail.com Windows XP Security Admin 0 01-05-2006 04:26 AM
Are there two ports 1234 (outgoing) and 1234 (incoming) or only one which can be used only exclusively for one direction? Peter Eisenman Windows XP Network Web 6 01-05-2006 04:01 AM


All times are GMT. The time now is 01:33 PM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. SEO by vBSEO 2.3.2 © 2005, Crawlability, Inc.

Outgoing DNAT, incoming SNAT?