Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have a Linux server which runs a particular service listening on a single TCP port. The Linux server connects to the internet using a PPP connection and also acts as router for a local network using an Ethernet connection. I keep a firewall running on this server and manage it using Shorewall package.

Recently I got another internet link to use as a redundant IP address for my clients to connect to and use the service. This ISP gives me a modem which should connect to my LAN switch and has an IP address of I configured this modem to forward the service port to my server which is at

The problem is users can not connect through the new connection to server, routing configuration on new modem is limited (I can't tell it to do SNAT) and I don't know what sort of configuration I need on the firewall on server.

In simple words I need to tell the firewall on server, when packets come from on port 1234, send the replies back to, despite whatever destination IP address is.

My best bet so far from my searches is which requires playing with server routes.

Is there any simpler way to do this preferably using iptables and shorewall?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.