LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-08-2010, 09:07 AM   #1
janusman
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Rep: Reputation: 0
public ip behind a firewall


Hi,

I am new to firewall and am trying out a setup which doesn't seem to work. I am trying to simulate a linux firewall using IP tables where my wifi AP is behind the firewall and it needs to have a public IP address.

I have the following setup:

Mobile<----Wifi Access <---------> Linux server <-------------> Internet
!!!!!!!!!!!!!!!!!!point
!!!!!!!!!!!!!!!!!!!!!!!AP-Int<----->|eth3######eth2|<-------->gw-int

AP-Int - [PublicIP1]
eth3 - [dummy IP]
eth2 - [PublicIP2]
gw-int - [PublicIP3]

*Note* - dummy IP used at Linux server is for allowing communication with the Wifi AP. That IP has not been allocated for me. It is simply used for connectivity.

All the Public IPs(PublicIP1,2,3) are in the same subnet. Linux server has IP forwarding enabled.

I am able to ping my gateway interface[PublicIP3] from linux server but when I try pinging the same from the wifi accesspoint(Int 1) I don't get any reply. I am able to see ICMP request packets in tcpdump being ran at eth2 interface of linux server. What could be the problem here?

Thanks.

Last edited by janusman; 10-08-2010 at 07:35 PM. Reason: indentation
 
Old 10-09-2010, 04:00 PM   #2
codevyper
LQ Newbie
 
Registered: Sep 2010
Posts: 9

Rep: Reputation: 1
What do your IP tables rules look like? Run:

iptables -nvL
and
iptables -t nat -nvL


When you run a tcpdump on eth2 where are you pinging from? Your diagram is a little confusing to me. You are showing public IP's behind your linux/iptables firewall. Everything at that point should be on private IP's, only your ISP's GW will have a public IP. Everything from the linux server back should be on private subnet ranges.
 
Old 10-10-2010, 06:33 AM   #3
janusman
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Original Poster
Rep: Reputation: 0
I think you are missing the point. My requirement is that I want public IP on the WiFi AP. There should not be natting. And I am yet to configure Iptables. First my setup should work before I can introduce iptable rules.

When I ping from the WiFi AP to say 4.2.2.2 (dns server), I can see the requests reaching "eth2" and eth2 forwards it to the next hop. But I dont see reply coming back even on eth2 or even any arp requests from the ISP's gateway.
 
Old 10-10-2010, 09:37 PM   #4
codevyper
LQ Newbie
 
Registered: Sep 2010
Posts: 9

Rep: Reputation: 1
Sorry if I misunderstood you. So what happens if you traceroute from the Linux server to 4.2.2.2? Does it get all the way to the dns server or does it drop somewhere along the way? Can you get to anywhere past the gw from your ISP from either the Linux server or the Wireless AP?
 
Old 10-10-2010, 09:57 PM   #5
janusman
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Original Poster
Rep: Reputation: 0
yeah .. i am able to ping 4.2.2.2 from my linux server and i get an answer back. But I ping from my wifi AP, the ICMP request packets go via the linux server to the ISP gw, but i dont get any reply back and i am sure the packet reaches the ISP gw. I have no idea what happens after that.
 
Old 10-10-2010, 11:11 PM   #6
codevyper
LQ Newbie
 
Registered: Sep 2010
Posts: 9

Rep: Reputation: 1
Since you've confirmed that the outbound packets from the wireless AP are getting at least as far as the ISP gw, the best thing I can suggest is to try to ping another Linux server out on the internet on a different ISP connection and run tcpdump on that linux server and see if it gets to that machine and what the packets look like coming into the external server.

If the public address from the wireless AP doesn't lead back to your ISP's gw to you, then the packets are being routed to the owner of that public IP. That still wouldn't explain why it works from the Linux server, but being able to tcpdump from an external server should reveal that easily enough.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Access firewall public IP from internal NATed DMZ machine rsantos Linux - Networking 6 05-25-2010 11:40 AM
how to check whether my public IP server has firewall cofigured gotoabhishek Linux - Security 6 06-17-2008 01:00 PM
Firewall for Public IPs Machines saifurab Linux - Security 5 06-07-2007 10:39 AM
I need to assign a Public IP to my Firewall How? mfeoli Linux - Networking 3 02-05-2004 07:54 PM
Firewall - filter for public IPs caremaker Linux - Networking 6 01-09-2004 12:17 PM

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

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