Networking Forums

Networking Forums > Computer Networking > Linux Networking > Changing outbound IP addresses

Reply
Thread Tools Display Modes

Changing outbound IP addresses

 
 
steve@hydramusic.net
Guest
Posts: n/a

 
      12-25-2004, 06:05 PM
Hello,

I want to set up my router so any request going to any ip address on
port 25 instead goes to my internal SMTP server. IE, if I do a "telnet
66.167.1.230 25", packets should instead be sent to "192.168.1.1 25".

Do I use the OUPUT chain or the FORWARD chain to do this? Is this DNAT?
Do I have to use stateful packet filtering or can I get by without it?

Just give me a general idea of what to do, I can look up the details on
google.

- Steve

 
Reply With Quote
 
 
 
 
Ken
Guest
Posts: n/a

 
      12-25-2004, 09:25 PM
Hi Steve -

On 25 Dec 2004 11:05:46 -0800, (E-Mail Removed) wrote:

>I want to set up my router so any request going to any ip address on
>port 25 instead goes to my internal SMTP server. IE, if I do a "telnet
>66.167.1.230 25", packets should instead be sent to "192.168.1.1 25".
>
>Do I use the OUPUT chain or the FORWARD chain to do this? Is this DNAT?
>Do I have to use stateful packet filtering or can I get by without it?
>
>Just give me a general idea of what to do, I can look up the details on
>google.


I'm assuming that the router and server are two different systems.
Yes, you want PREROUTING DNAT to change the destination IP address.
The FORWARD chain needs to ACCEPT the packets going both directions.

--
Ken
http://www.ke9nr.net/
 
Reply With Quote
 
KR
Guest
Posts: n/a

 
      12-25-2004, 10:30 PM
Ken wrote:
>
> On 25 Dec 2004 11:05:46 -0800, (E-Mail Removed) wrote:
>
>>I want to set up my router so any request going to any ip address on
>>port 25 instead goes to my internal SMTP server. IE, if I do a "telnet
>>66.167.1.230 25", packets should instead be sent to "192.168.1.1 25".
>>
>>Do I use the OUPUT chain or the FORWARD chain to do this? Is this DNAT?
>>Do I have to use stateful packet filtering or can I get by without it?

>
> I'm assuming that the router and server are two different systems.
> Yes, you want PREROUTING DNAT to change the destination IP address.
> The FORWARD chain needs to ACCEPT the packets going both directions.


To prevent asymmetric routing, he'll also need a DNAT rule in the
POSTROUTING chain. Assuming that the SMTP server and the workstations
generating SMTP traffic are on the same subnet, of course.
 
Reply With Quote
 
Ben Halicki
Guest
Posts: n/a

 
      12-26-2004, 12:57 AM
On Sat, 25 Dec 2004 11:05:46 -0800, steve wrote:

> Hello,
>
> I want to set up my router so any request going to any ip address on
> port 25 instead goes to my internal SMTP server. IE, if I do a "telnet
> 66.167.1.230 25", packets should instead be sent to "192.168.1.1 25".
>
> Do I use the OUPUT chain or the FORWARD chain to do this? Is this DNAT?
> Do I have to use stateful packet filtering or can I get by without it?
>
> Just give me a general idea of what to do, I can look up the details on
> google.
>
> - Steve


From memory you'll require both prerouting and postrouting rules. I have
a working solution at work and could dump the config here for you if you
like.

Make sure you check for open relays from an external source once you've
got everything configured. If the tables aren't configured correctly,
external packets may appear as if they are internal and therefore sendmail
will accept and relay all traffic.

Ben.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server 2008: dcpromo fails because of dynamic IP addresses - changing to static ones does not help Thomas Adams Windows Networking 2 08-10-2008 06:29 PM
Easy way of changing IP addresses using a script stuart.robert.watson@googlemail.com Windows Networking 1 01-24-2008 12:17 PM
Changing server IP addresses amadjeski Windows Networking 2 02-20-2006 05:20 AM
Changing Static IP Addresses Mike G Windows Networking 8 01-09-2006 05:52 PM
Changing MAC Addresses RWade Windows Networking 1 11-03-2003 10:09 PM



1 2 3 4 5 6 7 8 9 10 11