Line 18: |
Line 18: |
| * PAP authentication method | | * PAP authentication method |
| | | |
− | Open the '''config_generate''' script and navigate to the line 178. There, you should be able to see the '''"add_modem_section()"''' portion of the script, where we will be making our changes. To set a custom APN, you will need to add the following lines to the existing "uci_set" commands: | + | Open the '''config_generate''' script and navigate to the line 178. There, you should be able to see the '''"add_modem_section()"''' function, where we will be making our changes. To set a custom APN, you will need to add the following lines to the existing "uci_set" commands: |
− | * uci_set network "${interface}" force "-1"
| + | <pre> |
− | * uci_set network "${interface}" apn "YOUR_APN"
| + | uci_set network "${interface}" force "-1" |
| + | uci_set network "${interface}" apn "YOUR_APN" |
| + | </pre> |
| To add PAP authentication method, change the existing "'''uci_set network "${interface}" auth "none"'''" line to "'''uci_set network "${interface}" auth "pap"'''", then add the following lines to define your APN username and password: | | To add PAP authentication method, change the existing "'''uci_set network "${interface}" auth "none"'''" line to "'''uci_set network "${interface}" auth "pap"'''", then add the following lines to define your APN username and password: |
− | * uci_set network "${interface}" username "YOUR_USERNAME"
| + | <pre> |
− | * uci_set network "${interface}" password "YOUR_PASSWORD"
| + | uci_set network "${interface}" username "YOUR_USERNAME" |
− | After applying the aforementioned changes, the '''"add_modem_section()"''' portion of the script should look similar to this: | + | uci_set network "${interface}" password "YOUR_PASSWORD" |
− | [[File:Apn dif fin.png|left]] | + | </pre> |
| + | After applying the aforementioned changes, the '''"add_modem_section()"''' function in the script should look similar to this: |
| + | [[File:Apn dif fin.png|1748x963px]] |
| + | |
| + | ===Changing the default LAN IP address=== |
| + | ---- |
| + | |
| + | Open the '''config_generate''' script and navigate to the line 70; there, you should be able to see the '''"generate_network()"''' function, where we will be applying the following changes. For demonstration purposes, our custom LAN IP address will be set to '''"10.10.10.1"''': |
| + | * In the line 119 you should be able to see the '''"ipad=${ipaddr:-"%%LAN_IP%%"}"''' line. Change the '''"%%LAN_IP%%"''' portion with your desired LAN IP address; for example: '''"ipad=${ipaddr:-"10.10.10.1"}"''' |
| + | After applying this change, the '''"generate_network()"''' function should look similar to this: |
| + | [[File:Lan ip-fin1.png|1793x762px]] |
| + | |
| + | |
| + | ===Setting WAN port as LAN=== |
| + | ---- |
| + | |
| + | To enable the '''“WAN as LAN”''' feature, you will need to disable the WAN/WAN6 interfaces and bridge the '''“eth1”''' interface to the LAN interface in the same '''"generate_network()"''' function. |
| + | |
| + | To bridge the '''"eth1"'''' interface to the LAN interface, add the following command after the line 120: |
| + | <pre> |
| + | uci set network."$1".ifname='eth0 eth1' |
| + | </pre> |
| + | |
| + | To disable WAN/WAN6 interfaces, add the following commands after line 147 and line 158: |
| + | |
| + | '''After Line 147:''' |
| + | <pre> |
| + | set network.$1.disabled='1' |
| + | </pre> |
| + | '''After Line 158:''' |
| + | <pre> |
| + | set network.${1}6.disabled='1' |
| + | </pre> |
| + | |
| + | After applying these changes, the '''"generate_network()"''' function should look similar to this: |
| + | [[File:Lan-wan-fin1.png|1833x978px]] |