LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 09-01-2008, 08:14 AM   #1
tassadaque
LQ Newbie
 
Registered: Jun 2008
Posts: 15

Rep: Reputation: 0
Ping wifi from ethernet


HI

I have two machine Host A and Host B. Host A has ethernet card and Host B has ethernet card and wifi card running in ad hoc mode. i want to ping from my ethernet card the Host B's wifi card. My ethernet cards are in same subnet while the wifi card on Host B is in different subnet. how can i ping this using iptables or netfilter hooks i am using fedora 7
Thanks in advance
 
Old 09-01-2008, 11:46 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
You talk about two different subnets...please give more details on the network: e.g router(s), IP settings (static or DHCP), etc.

If you do ifconfig on a box to get the IP#, can you then ping that IP from another box?
 
Old 09-02-2008, 04:55 AM   #3
tassadaque
LQ Newbie
 
Registered: Jun 2008
Posts: 15

Original Poster
Rep: Reputation: 0
Post

HI
Thanks for reply
I am giving static IPs
Host A
ethernet Ip
192.168.1.1
Host B
ethernet
192.168.1.2
wifi
192.168.2.1

I am not using any router. To perform ping across subnet i give Host own Ip as the default gateway
I have successfully able to ping two systems with different subnets on ethernet
I also has successfully ping the systems using wifi cards in different subnets in the same way
Now what i want to do is to ping from 192.168.1.1, the wifi (192.168.2.1)
i think i should use iptables but i dont know how
 
Old 09-02-2008, 05:31 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
How are these machines connected? If there is no router, how do you connect 3 nodes and give them distinct IPs?

Please give complete details on the network--what is each computer connected to?, what provides the internet connection?, etc.
 
Old 09-03-2008, 03:00 AM   #5
tassadaque
LQ Newbie
 
Registered: Jun 2008
Posts: 15

Original Poster
Rep: Reputation: 0
I have two machines as under

Machine A

ethernet IP
192.168.1.1

Machine B

ethernet IP
192.168.1.2
WiFi IP
192.168.2.1

we are using class-less routing. I have these machines connected through a switch. I want to use HOST B as a special purpose gateway between LAN and WLAN users. So i want almost all traffic coming at ethernet card of Host B to be routed on the Wi-Fi card of Host B. and similarly all the traffic coming on Wi-Fi of host B to be routed on Ethernet card of Host B. I hope IPtables can do the job for me.

Secondly I want to make some changes before forwarding these packets from one network to other (say from LAN to WLAN). I thing netfilter hooks or something similar will be benificial for me. what commands should i use from IPtables and what events should i register to alter (temper the data packets) the traffic.

Last edited by tassadaque; 09-03-2008 at 03:11 AM.
 
Old 09-04-2008, 12:08 PM   #6
kinetic
Member
 
Registered: Aug 2007
Location: Fort Collins, Colorado
Distribution: Gentoo
Posts: 64

Rep: Reputation: 17
- Make sure both NIC's are up (ifconfig eth0 up; ifconfig wlan0 up)
- Turn on IP Forwarding (sysctl net.ipv4.ip_forward=1)

Thats it. It should work
 
  


Reply

Tags
iptables, ping


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ethernet and wifi are broken!! Lost In Here Linux - Wireless Networking 11 02-16-2008 09:42 PM
wifi adhoc without router can't share internet can ping fani Linux - Wireless Networking 3 05-28-2007 06:25 AM
Is it possible to bridge ethernet and wifi? daishin Linux - Wireless Networking 1 10-06-2006 02:53 PM
wifi vs ethernet DAChristen29 Ubuntu 9 07-28-2005 09:15 PM
Ping between 2 ad-hoc wifi computers bengo3 Linux - Wireless Networking 1 01-01-2005 01:08 PM


All times are GMT -5. The time now is 02:37 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration