You are not logged in.

#1 2018-08-04 19:10:50

readdeo
Member
Registered: 2017-12-16
Posts: 21

[SOLVED] Arch as a wifi router, incoming traffic problem

Hi!

I spent 2 days making my old laptop a wifi router with arch linux. I am using rp-pppoe to connect to the internet and create_ap to create a wifi ap for the other computers to connect to.
I have internet access on the other computers, but i cannot reach my ip from outside. It does not respond to ping, cannot connect to ssh, or any other service. The problem should be rp-pppoe because the ssh is running on the "router" arch and i cannot connect to it even if i do not set up the wifi ap. I tried iptables rules, netctl and router pages on the wiki and shit tons of googling. Now i have no idea where to go next. Could you please give me some hint on how to solve this?

Somewhere i read that the 10.0.0.x ip could be an issue if the ISP is using them too. I tried to change the create_ap and dnsmasq's config files to use 192.168.x.x but it still using 10.0.0.x. Could this be an issue really?

EDIT: Successfully changed the ap's ip to 192.168.1.1 and the problem still exists.

Last edited by readdeo (2018-08-09 19:38:14)

Offline

#2 2018-08-04 20:58:19

randomguy
Member
Registered: 2007-06-19
Posts: 101

Re: [SOLVED] Arch as a wifi router, incoming traffic problem

How do your iptables chains look like after "create_ap"? I don't know anything about the specific script you have use but prohibiting SSH (and other connections) from outside seems like a reasonable default. Generally I don't think spinning a homemade router with Archlinux is worthwhile except you're in for the learning experience or know exactly what you're doing.

Edit: The IP addresses you use inside your NAT don't concern your ISP. Both the ranges you used are fine to use inside a NAT.

Last edited by randomguy (2018-08-04 21:13:01)

Offline

#3 2018-08-04 21:33:29

readdeo
Member
Registered: 2017-12-16
Posts: 21

Re: [SOLVED] Arch as a wifi router, incoming traffic problem

iptables look like this:

[readdeo@readdeo-msi ~]$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
ACCEPT     udp  --  anywhere             anywhere             udp dpt:mdns
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:mdns

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.1.0/24
ACCEPT     all  --  192.168.1.0/24       anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Is there anything missing from it?

Offline

#4 2018-08-04 21:43:54

randomguy
Member
Registered: 2007-06-19
Posts: 101

Re: [SOLVED] Arch as a wifi router, incoming traffic problem

So you are trying to connect to SSH on your "router"? Does it work from inside the NAT?

Edit: Iptables has more built-in tables: sudo iptables -t nat -L -n -v

Last edited by randomguy (2018-08-04 21:52:33)

Offline

#5 2018-08-04 22:06:18

readdeo
Member
Registered: 2017-12-16
Posts: 21

Re: [SOLVED] Arch as a wifi router, incoming traffic problem

Yes it is working from the NAT. This is the output of  'sudo iptables -t nat -L -n -v':

[readdeo@readdeo-msi ~]$ sudo iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 153 packets, 43486 bytes)
 pkts bytes target     prot opt in     out     source               destination
   51  3372 REDIRECT   udp  --  *      *       192.168.1.0/24       192.168.1.1          udp dpt:53 redir ports 5353
    0     0 REDIRECT   tcp  --  *      *       192.168.1.0/24       192.168.1.1          tcp dpt:53 redir ports 5353

Chain INPUT (policy ACCEPT 55 packets, 3931 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 59 packets, 4372 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 59 packets, 4372 bytes)
 pkts bytes target     prot opt in     out     source               destination
   82 29270 MASQUERADE  all  --  *      !ap0    192.168.1.0/24       0.0.0.0/0
    0     0 MASQUERADE  all  --  *      enp0s4  0.0.0.0/0            0.0.0.0/0

Offline

#6 2018-08-04 22:23:06

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] Arch as a wifi router, incoming traffic problem

readdeo wrote:

Somewhere i read that the 10.0.0.x ip could be an issue if the ISP is using them too.

The address issued to the router by the ISP is 10.0.0.x ?

Offline

#7 2018-08-04 22:39:40

readdeo
Member
Registered: 2017-12-16
Posts: 21

Re: [SOLVED] Arch as a wifi router, incoming traffic problem

loqs wrote:
readdeo wrote:

Somewhere i read that the 10.0.0.x ip could be an issue if the ISP is using them too.

The address issued to the router by the ISP is 10.0.0.x ?

No, it's like 94.x.x.x.
The 10.0.0.1 was the ap's ip.

Offline

#8 2018-08-05 14:40:03

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,556

Re: [SOLVED] Arch as a wifi router, incoming traffic problem

From the outside you need to connect to that 94.x.x.x address .

If that's the address you can't connect to, check with your isp what access they support on your connection.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#9 2018-08-07 18:40:58

readdeo
Member
Registered: 2017-12-16
Posts: 21

Re: [SOLVED] Arch as a wifi router, incoming traffic problem

Turns out, my ISP is using NAT networks, so a telephone call solved my problem.

Offline

Board footer

Powered by FluxBB