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 11-27-2014, 03:31 AM   #1
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Rep: Reputation: 30
Iptables


Hi
I am working on captive portal for a wired network.
In iptables
/sbin/iptables -t nat -A PREROUTING -m mark --mark 99 -p tcp --dport 80 -j DNAT --to-destination xx.xx.xx.xx

It is working fine with for http port

I want that users trying crossing my proxy server (for https ftp etc) should also dnat to destination xx.xx.xx.xx to get them authenticated
 
Old 11-27-2014, 03:42 AM   #2
linuxgurusa
Member
 
Registered: Mar 2008
Location: Namibia, Swakopmund
Distribution: Redhat, Fedora, Centos, ClearOS, Mandrake
Posts: 151

Rep: Reputation: 29
That must be done on the proxy server itself, nothing to do with your firewall.

So the server xx.xx.xx.xx which is your proxy, and you confirmed that the redirect is working, must do the authentication.
So different problem for you
 
Old 11-27-2014, 03:52 AM   #3
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Original Poster
Rep: Reputation: 30
No my problem is only port 80 is being redirected to destination xx.xx.xx.xx
I need to redirect all other ports also to destination xx.xx.xx.xx
 
Old 11-27-2014, 03:59 AM   #4
linuxgurusa
Member
 
Registered: Mar 2008
Location: Namibia, Swakopmund
Distribution: Redhat, Fedora, Centos, ClearOS, Mandrake
Posts: 151

Rep: Reputation: 29
Quote:
Originally Posted by sanjibgupta View Post
No my problem is only port 80 is being redirected to destination xx.xx.xx.xx
I need to redirect all other ports also to destination xx.xx.xx.xx
/sbin/iptables -t nat -A PREROUTING -m mark --mark 99 -p tcp --dport 80:500 -j DNAT --to-destination xx.xx.xx.xx

Above is from port 80 to port 500 etc
 
Old 11-27-2014, 04:14 AM   #5
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Original Poster
Rep: Reputation: 30
when i do https://yahoo.com
it say private connection ans shows an NE:ERR_CERT_AUTHORITY_INVALID
when i press the RELOAD button it shows my destination page and soon return back to the same page
 
Old 11-27-2014, 04:36 AM   #6
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Original Poster
Rep: Reputation: 30
Sorry Sorry
It is working in IE but not in Chrome
Can you please tell me why
 
  


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
iptables error in android: iptables-save and iptables-restore not working preetb123 Linux - Mobile 5 04-11-2011 01:56 PM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
Iptables - Couldn't load target `ACCPET':/lib/iptables/libipt_ACCPET.so: z00t Linux - Security 3 01-26-2004 02:24 AM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM

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

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