LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-28-2010, 05:26 AM   #1
mukeshk.nist
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Rep: Reputation: 0
Smile how to allow a port in fedora firewall


hi all,
i am a newbie to fedora|linux,i have to deal with reverse proxy issue and want to access few LAN devices having port 5900 and 9999,can anybody help me what exact steps i have to follow to allow this port in fedora firewall.
thanks
mukesh
 
Old 01-28-2010, 10:15 AM   #2
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Do you want to access a LAN devices or fedora firewall?
 
Old 01-29-2010, 02:42 AM   #3
mukeshk.nist
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Original Poster
Rep: Reputation: 0
how to allow a port

hi nimnull
i have few lan configured devices which can be controlled over internet and i have one real ip and all lan devices have an ip local to the LAN,i want to redirect any external request to lan devices and output of devices to that end user something called reverse proxy.
 
Old 01-29-2010, 10:38 AM   #4
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
So, if ext_eth - is looking to router and int_eth is looking to LAN, then you need rules:
Code:
iptables -t nat -A PREROUTING -p tcp -d <IP_ext_int> --dport <YOUR_PORT> -j DNAT --to-destination <IP_int_eth>:<PORT>
iptables -t nat -A FORWARD -i ext_eth -o int_eth -j ACCEPT
iptables -t nat -A FORWARD -o ext_eth -i int_eth -j ACCEPT
echo "1" > /proc/sys/net/ipv4/ip_forward
After this, if you will connect to your ext_eth:50000 (for ex.) packets will be forwarded to <IP_int_eth>:<PORT>
If you would like to add more security and check source IP address of request, you need to add it to forward chain.

Something like this.
 
  


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
Fedora 10 com1 port will not connect to router console port using minicom rgjr979 Linux - Newbie 4 12-28-2009 05:35 PM
If I forward a port in iptables, does the port have to be open on the firewall? qwertyjjj Linux - Server 4 08-06-2009 09:22 AM
port 25 filtered despite firewall having port 25 open ille.pugil42 Linux - Security 8 03-09-2007 12:51 AM
firewall port forwarding manthram Linux - Networking 0 04-01-2002 07:08 PM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:18 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