LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-23-2012, 06:23 AM   #1
raczkowski1
LQ Newbie
 
Registered: Jan 2011
Location: Poznan/Poland
Distribution: Debian
Posts: 10

Rep: Reputation: 0
Forward public IP to local IP - can't ping host in public IP subnet


HI

I have host in local network with ip 192.168.10.50
and I forward publick ip 100.100.100.3/25 to 192.168.10.50

iptables:
Quote:
/sbin/iptables -t filter -A FORWARD -s 192.168.10.50 -j ACCEPT
/sbin/iptables -t filter -A FORWARD -d 192.168.10.50 -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -s 192.168.10.50 -j SNAT --to 100.100.100.3
/sbin/iptables -t nat -A PREROUTING -d 100.100.100.3 -j DNAT --to 192.168.10.50
Everything works fine bun I can't ping in the same subnet(100.100.100.0/25) where is using 100.100.100.3

Where could be problem?

Thanks
 
Old 03-23-2012, 10:15 AM   #2
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
are all your hosts on the 100.100.100.0/25 subnet configured with the same netmask?
if some are configured as /24 rather than /25 things will break
 
Old 03-25-2012, 11:17 AM   #3
raczkowski1
LQ Newbie
 
Registered: Jan 2011
Location: Poznan/Poland
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: 0
Hi
I have public range address IP with 23 bits netmask but I cut this for few smaller subnets and one have /25 bits mask.

Yesterday I resolved problem by setting public IP 100.100.100.3(this is example IP) on physical network card in my server and everything working now OK.

Thanks for reply.
 
  


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
How To Configure KVM with a Public IP Address Network that is on a Different subnet moe007 Linux - Virtualization and Cloud 5 09-13-2011 02:56 PM
Forward multiple public addresses with iptables Revenge282 Linux - Networking 3 06-12-2011 06:12 PM
[SOLVED] iptables redirect : local to remote public host paziulek Linux - Networking 2 05-17-2010 02:34 PM
Forward public ipaddress though linux MarleyGPN Linux - Networking 1 12-09-2005 11:40 PM
Possible? 1 public subnet/1 private; 1 host: traffic out the way it came in? JMCraig Linux - Networking 8 10-17-2005 08:12 PM

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

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