LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-01-2011, 06:12 AM   #1
tusharsharma43
LQ Newbie
 
Registered: Jan 2010
Location: Vadodara, Gujarat
Distribution: Fedora, OpenSuse, Ubuntu, Mint and Debian
Posts: 22

Rep: Reputation: 0
Question Unable to ping local subnet behind peer in IPSEC


Hello All,

I am setting up ipsec tunnel between two peer using racoon.
My setup.

pc(subnet)-----------pc:1-------------------pc:2------------subnet(pc)
192.168.3.0/24 192.168.101.111 192.168.101.113 192.168.2.0/24

My configuration on pc:1
###############################################################
path pre_shared_key "/etc/psk.txt";
remote 192.168.101.113 {
exchange_mode main;
proposal {
encryption_algorithm 3des;
hash_algorithm md5;
authentication_method pre_shared_key;
dh_group modp1024;
}
}
sainfo address 192.168.3.0/24 any address 192.168.2.0/24 any {
pfs_group modp768;
encryption_algorithm 3des;
authentication_algorithm hmac_md5;
compression_algorithm deflate;
}

###############################################################

Configuration on pc:2

path pre_shared_key "/etc/psk.txt";
remote 192.168.101.111 {
exchange_mode main;
proposal {
encryption_algorithm 3des;
hash_algorithm md5;
authentication_method pre_shared_key;
dh_group modp1024;
}
}
sainfo address 192.168.2.0/24 any address 192.168.3.0/24 any {
pfs_group modp768;
encryption_algorithm 3des;
authentication_algorithm hmac_md5;
compression_algorithm deflate;
}


###############################################################
spd policies in setkey.conf

#!/usr/sbin/setkey -f
#
# Flush SAD and SPD
flush;
spdflush;
# Create policies for racoon on pc1
spdadd 192.168.3.0/24 192.168.2.0/24 any -P out ipsec
esp/tunnel/192.168.101.111-192.168.101.113/require;
spdadd 192.168.2.0/24 192.168.3.0/24 any -P in ipsec
esp/tunnel/192.168.101.113-192.168.101.111/require;





But When i ping from subnet behind pc-2 to subnet behind pc-1 ,
destination host unreachable.

I have rule on pc-2
route add -net 192.168.3.0/24 via 192.168.101.113


Still no Success,
Do i need to add some iptables rules ???


Thanks
Tushar
 
Old 12-01-2011, 06:15 AM   #2
tusharsharma43
LQ Newbie
 
Registered: Jan 2010
Location: Vadodara, Gujarat
Distribution: Fedora, OpenSuse, Ubuntu, Mint and Debian
Posts: 22

Original Poster
Rep: Reputation: 0
Do i need port forwarding.
IPsec currently uses port 500 for isakmp packets.

Please Help.
 
Old 12-05-2011, 05:50 AM   #3
tusharsharma43
LQ Newbie
 
Registered: Jan 2010
Location: Vadodara, Gujarat
Distribution: Fedora, OpenSuse, Ubuntu, Mint and Debian
Posts: 22

Original Poster
Rep: Reputation: 0
I have solved this issue.
internal natting from lan to wan changes source ip of
packet,and ipsec is configured in sainfo such that if packet of
ip from local subnet comes, then only to send over tunnel.
Just changes policies of snat in iptables and it is working.

Thanking You,
Tushar
 
  


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
unable to send email on local subnet SKYNET2 Linux - Server 1 11-30-2011 04:58 AM
Unable to ping some hosts on local network from linux box john test Linux - Networking 17 04-17-2009 04:29 AM
Can't ping any PC outside subnet mrpc_cambodia Red Hat 2 10-07-2004 08:48 PM
can't browse LAN with redhat 9,2 peer to peer pcs, they ping right, newbee vinayak_shukre Linux - Networking 1 02-17-2004 09:49 PM
Unable to ping or Traceroute or FTP from local network. retheesh Linux - Networking 3 10-15-2003 06:20 AM

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

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