Port redirection with exclusions

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Port redirection with exclusions
# 1  
Old 09-23-2011
Port redirection with exclusions

Hi folks,

I have an application that is acting up. I have another machine with a replacement application on it but because of the naming structure clients are using I cannot change the name to the replacement machine as it is also used to access other applications.

The host OS is Centos 5.6 and iptables is running. I'm familiar with setting it up for firewall purposes but my attempts to use it for redirection thus far have ended up in lost packets.

So, say the primary server is running on and currently accepts SMTP mail.
The secondary server is running on and also accepts SMTP mail.
I have a backup off site mail server running on

I need to redirect all connections received on port 25 by to port 25 on but not redirect (and have the ability to exclude other hosts).

I'm sure this is possible, maybe a rule that accepts port 25 from before the rule that redirects port 25 elsewhere?

One caveat, the connections also need to appear to be coming from the original source host otherwise it will stuff up the spam filtering app. I wonder if this will be possible without some trickery at the destination box to make it accept and reply as without actually having the IP..hmm

For reference, there is no NAT involved. All IPs are Internet routable even though and are physically together.

It is probably fairly simple, I tried pulling what I've already tried from .bash_history but I think I did it from a screen session that hasn't kept it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script, find the next closed (not in use) port from some port range.

hi, i would like to create a bash script that check which port in my Linux server are closed (not in use) from a specific range, port range (3000-3010). the print output need to be only 1 port, and it will be nice if the output will be saved as a variable or in same file. my code is: ... (2 Replies)
Discussion started by: yossi
2 Replies

2. Shell Programming and Scripting

String of exclusions failed.

We are in a conversion where a list of six digit numbers needs to be excluded from an existing report. As new ones are added we have an ever longer string of "grep -v" commands like: grep -v 020516 | grep -v 020522 | grep -v 030132 | \ grep -v 030330 | grep -v 030357 | grep -v 050111 | \ ... (7 Replies)
Discussion started by: wbport
7 Replies

3. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

4. Solaris

Cabling and adapters to communicate to service processor serial port from Windows PC with USB port.

Hello, I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build. The first part is what confuses me -the cabling. I am coming from a Windows machine (w/appropriate... (5 Replies)
Discussion started by: joboy
5 Replies

5. UNIX and Linux Applications

Weblogic Port redirection from 7001 to 7002

Hi, I have my WebLogic server up and running on port 7002, and can be accessed from : https://mydomain.com:7002/App1 i want to configure Port redirection from 7001 to 7002 if users Login to http://mydomain.com:7001/App1 it should automatically take them to ... (1 Reply)
Discussion started by: szs
1 Replies

6. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

7. Solaris

How to enable Serial port on ILOM, when Network Port is enabled in parallel

Hi Everyone, In my environment, I have few T5220. On the iLOM Management Card, I have both Network and Serial port are cabled, I don't have any issues while I try to connect using Network Management port, but when I try to connect the serial port for the same server which is actually connected... (3 Replies)
Discussion started by: bobby320
3 Replies

8. UNIX for Dummies Questions & Answers

Redirection to GNU screen attached serial port

I'm using GNU screen as a terminal to connect with a usb serial port. eg. screen /dev/tty.usbserial . This works well enough for manual processes. Is there a way to redirect the output of a script running in another session to the stdin of this virtual terminal? ie. I want to repeatedly send some... (1 Reply)
Discussion started by: geoffjMontreal
1 Replies

9. Solaris

Find command with exclusions

Hi All I need to find the biggest files on our system BUT excluding some directories. I.E Find / -size +10000 (excluding 'platform'|'db' ..etc) |sort -n > file I tried grep -v but that can only do one expression at a time. Tried /usr/xpg4/bin/grep but cant use -v Please help Chris (5 Replies)
Discussion started by: JTS911
5 Replies
Login or Register to Ask a Question