LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-01-2017, 05:56 AM   #1
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432
Blog Entries: 1

Rep: Reputation: 41
Firewall - redirect all traffic from single IP to internal IP and port


I am using IPfire.

I would like to redirect all traffic from (external) 1.2.3.4 to (internal) 4.5.6.7:62000 This way the source machine is met with a default page, but the rest of the world roams freely. Is this possible?

I've been trying different things, but not having any luck.

thanks.
 
Old 04-01-2017, 10:22 AM   #2
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by mpyusko View Post
I am using IPfire.

I would like to redirect all traffic from (external) 1.2.3.4 to (internal) 4.5.6.7:62000 This way the source machine is met with a default page, but the rest of the world roams freely. Is this possible?

I've been trying different things, but not having any luck.

thanks.
Hey mpyusko,

Not sure I understand 100% what you're asking, but I'll take a stab at it. Sounds to me like typical port-forwarding - and again, please correct me if I'm wrong. Here are my assumptions and comments:

1) by "internal" you mean your LAN and by "external" you are referring to the Internet

2) You want to direct certain external traffic to an internal IP address and port

3) This is usually done not based on the incoming IP address (which may be anything), but based on the port specified. You would then redirect external traffic coming in over port 11111, for example to an internal IP address and port number 22222.

Again, please confirm if I've understood your question correctly.

Cheers :-)
 
Old 04-01-2017, 10:36 AM   #3
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432

Original Poster
Blog Entries: 1

Rep: Reputation: 41
Correct. In this case I need to do it by IP. The machine in question has a fixed ip 1.2.3.4, but I do not have access to the machine to redirect it. So I want to take all traffic coming from it using Ports 80 and 443 and redirect them to 62000 and 62001 respectively on 4.5.6.7. I tried port forwarding using IPfires's interface, but it didn't work. Perhaps iptables?
 
Old 04-01-2017, 10:48 AM   #4
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by mpyusko View Post
Correct. In this case I need to do it by IP. The machine in question has a fixed ip 1.2.3.4, but I do not have access to the machine to redirect it. So I want to take all traffic coming from it using Ports 80 and 443 and redirect them to 62000 and 62001 respectively on 4.5.6.7. I tried port forwarding using IPfires's interface, but it didn't work. Perhaps iptables?
OK I understand. I am unfortunately familiar with neither iptables nor IPFire. I only use the basic firewall / forwarding capabilities of my router - they cover my needs.

Hopefully other members with the appropriate expertise will chime in. I quickly looked at the wiki page of my own distro (Arch), and the information on iptables is quite extensive. Perhaps your distro has something similar or worst case, the information in the Arch wiki may seamlessly apply since iptables is a generic linux utility.

Cheers,
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect traffic coming on one port to port of another server vikas027 Linux - Software 2 11-12-2011 12:28 PM
iptables redirect all traffic from external ip to internal ip brb_bart Linux - Networking 1 12-17-2009 06:56 PM
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM
Redirect all traffic to IP nn to internal IP xx Red Squirrel Linux - Networking 1 03-17-2009 05:20 PM
Redirect traffic to internal IP? xmutex Linux - Networking 1 08-13-2001 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration