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 04-05-2023, 11:41 AM   #1
KurtAran
LQ Newbie
 
Registered: Apr 2023
Posts: 2

Rep: Reputation: 0
Question IPtables question for ethernet and wifi connection


My network diagram is below. My computer is connected to the wifi router. the linux device is also connected to wifi router.

I am looking for a way to reach the wired camera through port 80 using ip address 192.168.0.154:8080 from my computer. 8080 is an arbitrary port number I wrote now. IP camera's feed can be seen using http. The ip camera's port 80 is open.


|linux device: 192.168.0.154| ---------| ethernet switch |--------| IP camera :192.168.1.100 |




Can someone write me the commands to be used in iptables? I am searching for that on internet but I guess I am doing some minor mistakes.

Last edited by KurtAran; 04-05-2023 at 11:43 AM. Reason: the diagram was corrupted
 
Old 04-05-2023, 01:22 PM   #2
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 573

Rep: Reputation: Disabled
Have you tried changing the IP Camera listening port?
 
Old 04-05-2023, 02:56 PM   #3
KurtAran
LQ Newbie
 
Registered: Apr 2023
Posts: 2

Original Poster
Rep: Reputation: 0
why do I need to change it? I need iptables commands in the linux device
 
Old 04-05-2023, 05:02 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,734

Rep: Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920
Quote:
|linux device: 192.168.0.154| ---------| ethernet switch |--------| IP camera :192.168.1.100 |
Without knowing your exact network configuration I would guess that the camera is not on the same IP subnet as the rest of your LAN i.e. 192.168.0.154/24 and 192.168.1.100/24. If this is true and you do not want to change the IP address of the camera you can try adding a secondary address to your linux device ethernet.

sudo ip add 192.168.1.101 device enp0s3 label enp0s3:1 (change the device name to match your actual ethernet adapter configuration)

I assume that the camera is the only device on the 102.168.1.0/24 network. Can you now ping the camera from the linux device? Without seeing your actual firewall rules it is impossible to know if you need to add rules to allow traffic on the 192.168.1.x network nor why you need to use a different port other then 80
 
  


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
Ubuntu 20LTS dual boot Laptop Dell Inspiron 5548 I can not turn on wifi and in wifi settings indicates no wifi device was found Shra94 Linux - Hardware 1 05-19-2020 04:22 PM
Want to share my wifi by creating a wifi hotspot ( While staying connected to wifi)? shadyXV Linux - Desktop 4 07-20-2015 05:37 PM
Need tips on using Ethernet to power WiFi network, and tips on setting up WiFi crabpot8 Linux - Networking 2 08-24-2009 06:42 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

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

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