LinuxQuestions.org
Visit Jeremy's Blog.
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 01-02-2016, 09:18 AM   #1
packets
Member
 
Registered: Oct 2005
Posts: 339

Rep: Reputation: 32
firewalld port forwarding specific ip how?


I have migrated my application from CentOS 6 to CentOS 7. It is using firewalld so I need to convert my iptables script from my CentOS 6. I have 2 ip on a same nic (eth0)

eth0 - 1.1.1.1
eth0:0 - 1.1.1.2

1.1.1.1 has an application listening to port 25 and should receive traffic
1.1.1.2 has an application liestning to port 8025. It has port forwarding all traffic to port 25 going to 1.1.1.2 will be directed to port 8025.

The above is working in my iptables script but not on firewalld. I understand that firewalld works on zones and not by ip address destination. Is there a way I can configure both rules above in firewalld? I have configured port forwarding but not the first rule. If I telnet to 1.1.1.1 port 25, it is being directed to 8025. It should be directing to port 8025 since I have an application listening to port 25 of 1.1.1.1.

Code:
public (default, active)
  interfaces: eth0
  sources:
  services: dhcpv6-client smtp ssh
  ports: 110/tcp 3500/tcp 28/tcp 25/tcp 8025/tcp 587/tcp 143/tcp 26/tcp
  masquerade: yes
  forward-ports: port=25:proto=tcp:toport=8025:toaddr=1.1.1.2
  icmp-blocks:
  rich rules:
 
Old 01-02-2016, 09:48 PM   #2
packets
Member
 
Registered: Oct 2005
Posts: 339

Original Poster
Rep: Reputation: 32
Please disregard. I found a work around. I opted to use my iptables script and incorporate it on systemd.
 
  


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
firewalld port forwarding sometimes not working packets Linux - Security 1 12-15-2015 05:49 PM
Shorewall: port forwarding problem, port is closed even after forwarding Synt4x_3rr0r Linux - Networking 2 12-13-2009 04:36 PM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Forwarding the Apache HTTPD log reporter to a specific port nkanthikiran Linux - Server 1 11-03-2006 04:26 AM
forwarding a specific port from eth0 to eth1 zovres Linux - Networking 2 05-02-2006 10:01 PM

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

All times are GMT -5. The time now is 07:28 PM.

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